Preview
We're still working on this feature, but we'd love for you to try it out!
This feature is currently provided as part of a preview pursuant to our pre-release policies.
Get comprehensive insights into your Oracle Pluggable Database (PDB) performance with database monitoring, query analysis, and system health metrics using the New Relic Distribution of OpenTelemetry (NRDOT) collector.
Guided installation
To install through the New Relic UI instead, go to one.newrelic.com > Integrations & Agents > Oracle (OpenTelemetry) . This page covers the CLI install path only.
Tip
If you need to monitor the entire container database rather than an individual pluggable database, refer to CDB instrumentation.
Prerequisites
Before you begin, ensure you have the following:
- Valid New Relic license key
- Supported architecture: Linux with AMD64 and ARM64
- Network connectivity to New Relic OTLP endpoint
- Oracle Database
19cor later
Enroll to preview
This integration is available as part of the New Relic public preview program. Contact your Organization Manager to opt in from the Previews & Trials page.
Install NRDOT Collector
Select the appropriate installation distribution method for your Linux environment:
Configure database user
Create a monitoring user with the necessary privileges for your PDB Oracle Database instance.
- Run the following statement as SYS before creating the user or running any grants:ALTER SESSION SET CONTAINER = "<YOUR_PDB>";
- Run the following statements as SYS inside your target PDB to create a local monitoring user:CREATE USER <USER_NAME> IDENTIFIED BY "<YOUR_PASSWORD>";GRANT CREATE SESSION TO <USER_NAME>;
Grant monitoring privileges for multitenant database
Run these commands as the SYS user inside your PDB. This gives the monitoring tool the basic access it needs to collect metrics, track events, and find your database instances.
GRANT SELECT ON V_$INSTANCE TO <USER_NAME>;GRANT SELECT ON V_$DATABASE TO <USER_NAME>;GRANT SELECT ON V_$CONTAINERS TO <USER_NAME>;GRANT SELECT ON V_$DATAFILE TO <USER_NAME>;GRANT SELECT ON V_$SYSSTAT TO <USER_NAME>;GRANT SELECT ON V_$SYSMETRIC TO <USER_NAME>;GRANT SELECT ON V_$SESSION TO <USER_NAME>;GRANT SELECT ON V_$RESOURCE_LIMIT TO <USER_NAME>;GRANT SELECT ON V_$OSSTAT TO <USER_NAME>;GRANT SELECT ON V_$SGAINFO TO <USER_NAME>;GRANT SELECT ON V_$ROWCACHE TO <USER_NAME>;GRANT SELECT ON V_$PARAMETER TO <USER_NAME>;GRANT SELECT ON DBA_TABLESPACE_USAGE_METRICS TO <USER_NAME>;GRANT SELECT ON DBA_TABLESPACES TO <USER_NAME>;GRANT SELECT ON DBA_DATA_FILES TO <USER_NAME>;GRANT SELECT ON DBA_FREE_SPACE TO <USER_NAME>;GRANT SELECT ON DBA_RECYCLEBIN TO <USER_NAME>;GRANT SELECT ON V_$SQL TO <USER_NAME>;GRANT SELECT ON V_$SQL_PLAN_STATISTICS_ALL TO <USER_NAME>;GRANT SELECT ON V_$LOCK TO <USER_NAME>;GRANT SELECT ON V_$SESSION_EVENT TO <USER_NAME>;GRANT SELECT ON DBA_PROCEDURES TO <USER_NAME>;GRANT SELECT ON DBA_OBJECTS TO <USER_NAME>;GRANT SELECT ON V_$PDBS TO <USER_NAME>;GRANT SELECT ON CDB_SERVICES TO <USER_NAME>;Configure NRDOT Collector
Configure the NRDOT Collector with your PDB-specific settings.
Create the configuration file. The filename must be
oracle-config.yaml.bash$sudo nano /etc/nrdot-collector/oracle-config.yamlAdd the configuration content below to the
oracle-config.yamlfile you created in the previous step:full configuration
This configuration focuses only on database monitoring without host infrastructure metrics. To enable full-feature monitoring, refer to the configuration reference.
oracle-config.yaml1receivers:2nroracledb:3endpoint: oracle.example.com:15214username: newrelic5password: YOUR_PASSWORD6service: YOUR_PDB_SERVICE_NAME7collection_interval: 10s8events:9db.server.query_sample:10enabled: true11db.server.top_query:12enabled: true13db.server.session.wait_sample:14enabled: true1516top_query_collection:17max_query_sample_count: 100018top_query_count: 20019collection_interval: 60s20allowed_comment_keys:21- nr_service_guid2223query_sample_collection:24max_rows_per_query: 10025allowed_comment_keys:26- nr_service_guid2728session_wait_event_collection:29max_rows_per_query: 1003031# Metrics configuration - organized by category32metrics:33# === CPU & Performance Metrics ===34oracledb.cpu_time:35enabled: true36attributes:37- oracle.db.pdb38oracledb.database.cpu.utilization:39enabled: true40attributes:41- oracle.db.pdb42oracledb.host.cpu.utilization:43enabled: true44attributes:45- oracle.db.pdb4647# === Execution & Parse Metrics ===48oracledb.executions:49enabled: true50attributes:51- oracle.db.pdb52oracledb.execution.utilization:53enabled: true54attributes:55- oracledb.parse.type56- oracle.db.pdb57oracledb.parse_calls:58enabled: true59attributes:60- oracle.db.pdb61oracledb.parse.rate:62enabled: true63attributes:64- oracledb.parse.result65- oracle.db.pdb66oracledb.parse.utilization:67enabled: true68attributes:69- oracle.db.pdb70oracledb.hard_parses:71enabled: true72attributes:73- oracle.db.pdb7475# === I/O & Physical Read/Write Metrics ===76oracledb.logical_reads:77enabled: true78attributes:79- oracle.db.pdb80oracledb.physical_reads:81enabled: true82attributes:83- oracle.db.pdb84oracledb.physical_reads_direct:85enabled: true86attributes:87- oracle.db.pdb88oracledb.physical_writes:89enabled: true90attributes:91- oracle.db.pdb92oracledb.physical_writes_direct:93enabled: true94attributes:95- oracle.db.pdb96oracledb.physical_read_io_requests:97enabled: true98attributes:99- oracle.db.pdb100oracledb.physical_write_io_requests:101enabled: true102attributes:103- oracle.db.pdb104105# === New Physical I/O Metrics (detailed) ===106oracledb.physical_io.cache_writes:107enabled: true108attributes:109- oracle.db.pdb110oracledb.physical_io.requests:111enabled: true112attributes:113- disk.io.direction114- disk.io.block_size115- oracle.db.pdb116oracledb.physical_io.transferred:117enabled: true118attributes:119- disk.io.direction120- disk.io.type121- oracle.db.pdb122123# === Network I/O Metrics ===124oracledb.sqlnet.io.transferred:125enabled: true126attributes:127- network.io.direction128- destination.type129- oracle.db.pdb130131# === Buffer & Cache Metrics ===132oracledb.consistent_gets:133enabled: true134attributes:135- oracle.db.pdb136oracledb.db_block_gets:137enabled: true138attributes:139- oracle.db.pdb140oracledb.buffer_cache.utilization:141enabled: true142attributes:143- oracle.db.pdb144oracledb.library_cache.utilization:145enabled: true146attributes:147- oracle.db.pdb148oracledb.data_dictionary.hit_ratio:149enabled: true150oracledb.shared_pool.utilization:151enabled: true152attributes:153- oracle.db.pdb154155# === Memory Metrics ===156oracledb.pga_memory:157enabled: true158attributes:159- oracle.db.pdb160oracledb.sga.limit:161enabled: true162oracledb.sga.usage:163enabled: true164attributes:165- oracledb.sga.component.name166167# === Wait & Database Time Metrics ===168oracledb.database.wait.utilization:169enabled: true170attributes:171- oracle.db.pdb172173# === Lock & Deadlock Metrics ===174oracledb.dml_locks.limit:175enabled: true176oracledb.dml_locks.usage:177enabled: true178oracledb.enqueue_locks.limit:179enabled: true180oracledb.enqueue_locks.usage:181enabled: true182oracledb.enqueue_resources.limit:183enabled: true184oracledb.enqueue_resources.usage:185enabled: true186oracledb.enqueue_deadlocks:187enabled: true188attributes:189- oracle.db.pdb190oracledb.exchange_deadlocks:191enabled: true192attributes:193- oracle.db.pdb194195# === Process & Session Metrics ===196oracledb.processes.limit:197enabled: true198oracledb.processes.usage:199enabled: true200oracledb.sessions.limit:201enabled: true202oracledb.sessions.usage:203enabled: true204attributes:205- session_type206- session_status207- oracle.db.pdb208oracledb.logons:209enabled: true210attributes:211- oracle.db.pdb212213# === Transaction Metrics ===214oracledb.transactions.limit:215enabled: true216oracledb.transactions.usage:217enabled: true218oracledb.user_commits:219enabled: true220attributes:221- oracle.db.pdb222oracledb.user_rollbacks:223enabled: true224attributes:225- oracle.db.pdb226227# === Tablespace Metrics ===228oracledb.tablespace_size.limit:229enabled: true230attributes:231- tablespace_name232- oracle.db.pdb233oracledb.tablespace_size.usage:234enabled: true235attributes:236- tablespace_name237- oracle.db.pdb238239# === Storage Metrics ===240oracledb.storage.usage:241enabled: true242oracledb.storage.utilization:243enabled: true244oracledb.recycle_bin.limit:245enabled: true246247# === Parallel Operations Metrics ===248oracledb.queries_parallelized:249enabled: true250attributes:251- oracle.db.pdb252oracledb.ddl_statements_parallelized:253enabled: true254attributes:255- oracle.db.pdb256oracledb.dml_statements_parallelized:257enabled: true258attributes:259- oracle.db.pdb260oracledb.parallel_operations_not_downgraded:261enabled: true262attributes:263- oracle.db.pdb264oracledb.parallel_operations_downgraded_1_to_25_pct:265enabled: true266attributes:267- oracle.db.pdb268oracledb.parallel_operations_downgraded_25_to_50_pct:269enabled: true270attributes:271- oracle.db.pdb272oracledb.parallel_operations_downgraded_50_to_75_pct:273enabled: true274attributes:275- oracle.db.pdb276oracledb.parallel_operations_downgraded_75_to_99_pct:277enabled: true278attributes:279- oracle.db.pdb280oracledb.parallel_operations_downgraded_to_serial:281enabled: true282attributes:283- oracle.db.pdb284285# === Redo & Sort Metrics ===286oracledb.redo_allocation.utilization:287enabled: true288attributes:289- oracle.db.pdb290oracledb.sort.ratio:291enabled: true292attributes:293- oracledb.sort.type294- oracle.db.pdb295296# === Response Time Metrics ===297oracledb.sql_service.response.duration:298enabled: true299attributes:300- oracle.db.pdb301302# Resource attributes attached to all metrics/logs (all enabled by default)303resource_attributes:304host.name:305enabled: true306oracle.db.hosting_type:307enabled: true308oracle.db.open_mode:309enabled: true310oracle.db.pdb:311enabled: true312oracle.db.role:313enabled: true314oracle.db.version:315enabled: true316oracledb.instance.name:317enabled: true318service.instance.id:319enabled: true320processors:321batch:322resource/add_event_name:323attributes:324- key: host.address325value: YOUR_DB_HOST326action: upsert327exporters:328otlp/newrelic:329endpoint: https://otlp.nr-data.net:4318330headers:331api-key: YOUR_LICENSE_KEY332compression: gzip333retry_on_failure:334enabled: true335initial_interval: 5s336max_interval: 30s337max_elapsed_time: 300s338service:339pipelines:340metrics/oracledb:341receivers: [nroracledb]342processors: [resource/add_event_name, batch]343exporters: [otlp/newrelic]344logs/oracledb:345receivers: [nroracledb]346processors: [resource/add_event_name, batch]347exporters: [otlp/newrelic]Under the Events section, enable these event types to collect their metrics:
Event
Description
db.server.query_samplePer-session active query samples capturing current SQL, wait state, and blocking details.
db.server.top_queryTop N SQL statements by CPU or elapsed time, including execution stats and query plans.
db.server.session.wait_samplePer-session cumulative wait counts and durations from
v$session_event.Configure the collection settings for each event type:
Configuration Section
Parameter
Value
top_query_collectionmax_query_sample_count1000
top_query_collectiontop_query_count200
top_query_collectioncollection_interval60s
query_sample_collectionmax_rows_per_query100
session_wait_event_collectionmax_rows_per_query100
Tip
For more detailed information about New Relic OTLP endpoint configuration and OpenTelemetry best practices, refer to OpenTelemetry OTLP documentation.
Update NRDOT Collector configuration
Update the NRDOT Collector configuration to use your oracle-config.yaml file:
$sudo sed -i 's|OTELCOL_OPTIONS="--config=/etc/nrdot-collector/config.yaml"|OTELCOL_OPTIONS="--config=/etc/nrdot-collector/oracle-config.yaml"|' /etc/nrdot-collector/nrdot-collector.confTip
You can also:
- Configure multiple receivers: To monitor multiple Oracle Database instances from one collector.
- Configure SQL Query Receiver: To collect custom metrics from your Oracle Database.
- Link your Oracle Database with APM: To correlate your application performance with database operations. This allows you to see exactly which applications are generating specific database workloads.
- Set up secret management: To securely manage sensitive information, such as database credentials. This helps to enhance the security of your monitoring setup by avoiding hardcoding sensitive data in configuration files.
Restart NRDOT Collector
After updating your configuration, restart the NRDOT Collector:
$sudo systemctl restart nrdot-collector.service$sudo systemctl status nrdot-collector.serviceTip
Always restart the NRDOT Collector after making configuration changes to ensure the new settings take effect.
Find and use your data
Once your data is being collected, you can access comprehensive Oracle Database monitoring through New Relic's UI.
To find your Oracle Database entity in New Relic:
- Go to https://one.newrelic.com > All Capabilities > Databases.
- Set the search criteria as
instrumentation.provider = opentelemetry. - Select your Oracle Database from the list of entities.