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 Container Database (CDB) performance with database monitoring, query analysis, and system health metrics using the New Relic Distribution of OpenTelemetry (NRDOT) collector. All Pluggable Databases (PDBs) under the configured CDB are monitored.
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.
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 necessary privileges for your multitenant Oracle Database. This requires creating a common user with the C## prefix.
To set your current active container context to
CDB$ROOT, execute the following statement as aSYSuser:ALTER SESSION SET CONTAINER = CDB$ROOT;For multitenant databases:
Log in to the root database as an administrator.
To create a new user, run the following
CREATE USERstatement:CREATE USER c##<YOUR_DB_USERNAME> IDENTIFIED BY "<USER_PASSWORD>" CONTAINER=ALL;GRANT CREATE SESSION TO c##<YOUR_DB_USERNAME> CONTAINER=ALL;Sugerencia
The newly created user'll be a common user with the
C##prefix. TheC##prefix is required for common users by Oracle.
To allow the monitoring user to see every PDB's rows in container-data views, run the following statement as
SYSDBAon the CDB root. This is required for per-PDB metrics and events.ALTER USER c##<YOUR_DB_USERNAME> SET CONTAINER_DATA=ALL CONTAINER=CURRENT;Sugerencia
Ensure your
USER_PASSWORDmeets Oracle new user password requirements.
Grant monitoring privileges for multitenant database
Run the following GRANT statements as SYSDBA on the CDB root. These cover instance detection, metrics collection, per-PDB monitoring, and events collection. You can execute them together as a single script or run each statement individually.
GRANT SELECT ON V_$INSTANCE TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$DATABASE TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$CONTAINERS TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$DATAFILE TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$SYSSTAT TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$CON_SYSSTAT TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$SYSMETRIC TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$CON_SYSMETRIC TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$SESSION TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$RESOURCE_LIMIT TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$OSSTAT TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$SGAINFO TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$ROWCACHE TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$PARAMETER TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON CDB_TABLESPACE_USAGE_METRICS TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON CDB_TABLESPACES TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON DBA_DATA_FILES TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON DBA_FREE_SPACE TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON DBA_RECYCLEBIN TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$SQL TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$SQL_PLAN_STATISTICS_ALL TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$LOCK TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$SESSION_EVENT TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON DBA_PROCEDURES TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON DBA_OBJECTS TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$PDBS TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON CDB_SERVICES TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$ASM_DISKGROUP_STAT TO c##<USER_NAME> CONTAINER=ALL;GRANT SELECT ON V_$ASM_DISK_STAT TO c##<USER_NAME> CONTAINER=ALL;Sugerencia
The V_$ASM_DISKGROUP_STAT and V_$ASM_DISK_STAT grants are only required if you want to collect ASM diskgroup and disk metrics.
Configure NRDOT Collector
Configure the NRDOT Collector with your CDB-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: C##newrelic5password: YOUR_PASSWORD6service: YOUR_CDB_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# === ASM (Automatic Storage Management) Metrics ===303# Disabled by default (opt-in). Requires the V_$ASM_DISKGROUP_STAT and304# V_$ASM_DISK_STAT grants from the previous step.305oracledb.asm.disk_group.free:306enabled: false307oracledb.asm.disk_group.capacity:308enabled: false309oracledb.asm.disk_group.usable_free:310enabled: false311oracledb.asm.disk_group.offline_disks:312enabled: false313oracledb.asm.disk.errors:314enabled: false315316# Resource attributes attached to all metrics/logs (all enabled by default)317resource_attributes:318host.name:319enabled: true320oracle.db.hosting_type:321enabled: true322oracle.db.open_mode:323enabled: true324oracle.db.pdb:325enabled: true326oracle.db.role:327enabled: true328oracle.db.version:329enabled: true330oracledb.instance.name:331enabled: true332service.instance.id:333enabled: true334processors:335batch:336resource/add_event_name:337attributes:338- key: host.address339value: YOUR_DB_HOST340action: upsert341exporters:342otlp/newrelic:343endpoint: https://otlp.nr-data.net:4318344headers:345api-key: YOUR_LICENSE_KEY346compression: gzip347retry_on_failure:348enabled: true349initial_interval: 5s350max_interval: 30s351max_elapsed_time: 300s352service:353pipelines:354metrics/oracledb:355receivers: [nroracledb]356processors: [resource/add_event_name, batch]357exporters: [otlp/newrelic]358logs/oracledb:359receivers: [nroracledb]360processors: [resource/add_event_name, batch]361exporters: [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
Sugerencia
For more detailed information about New Relic OTLP endpoint configuration and OpenTelemetry best practices, refer to the 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.confSugerencia
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.serviceSugerencia
Always restart the NRDOT Collector after making configuration changes so 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.