---
title: Install & configure OpenTelemetry CNCF for Oracle Database monitoring
source: https://docs.newrelic.com/docs/opentelemetry/database/oracle/cncf
---

> #### 💡 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](https://docs.newrelic.com/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy/).

You can use the OpenTelemetry Collector Contribution for Oracle Database to monitor your instance. The OpenTelemetry Collector Contribution is a community-supported project that provides a way to collect telemetry data from Oracle Database and send it to New Relic.

By default, the OpenTelemetry Collector Contribution collects metrics from Oracle Database and sends them to New Relic. However, these are limited metrics. In order to send query performance metrics, wait-time metrics, session metrics, ASM storage metrics, and other advanced metrics, you will need to configure the OpenTelemetry Collector Contribution. This guide provides instructions for configuring the OpenTelemetry Collector Contribution to collect advanced metrics from Oracle Database and send them to New Relic.

## Prerequisites [#prerequisites]

-   OpenTelemetry Collector Contrib (`otelcol-contrib`) installed & configured on your system. You can download the latest release from the [OpenTelemetry Collector releases](https://github.com/open-telemetry/opentelemetry-collector-releases/releases) page.

## Enable UI metrics [#enable]

You can enrich your New Relic platform experience by adding and enabling the various metrics in your `otelcol-contrib` configuration file. Using the configuration provided in this section, you can populate data for following pages in the New Relic platform:

-   Overview
-   Query performance
-   Wait events
-   Sessions

**Enable Overview page metrics**

The Overview page displays a high-level view of your Oracle Database instance, including key metrics such as CPU utilization, wait time, I/O, memory, and session usage.

To populate data for the Overview page in the New Relic platform, add the following configuration to your `otelcol-contrib` configuration file:

```yaml
receivers:
  oracledb:
    # Metrics required by the "Oracle Database Monitoring (OTel)" dashboard
    metrics:
      oracledb.buffer_cache.utilization:
        enabled: true
      oracledb.consistent_gets:
        enabled: true
      oracledb.cpu_time:
        enabled: true
      oracledb.database.cpu.utilization:
        enabled: true
      oracledb.database.wait.utilization:
        enabled: true
      oracledb.db_block_gets:
        enabled: true
      oracledb.enqueue_deadlocks:
        enabled: true
      oracledb.execution.utilization:
        enabled: true
      oracledb.executions:
        enabled: true
      oracledb.hard_parses:
        enabled: true
      oracledb.host.cpu.utilization:
        enabled: true
      oracledb.library_cache.utilization:
        enabled: true
      oracledb.logical_reads:
        enabled: true
      oracledb.logons:
        enabled: true
      oracledb.parse.rate:
        enabled: true
      oracledb.parse_calls:
        enabled: true
      oracledb.pga_memory:
        enabled: true
      oracledb.physical_io.requests:
        enabled: true
      oracledb.physical_reads:
        enabled: true
      oracledb.physical_writes:
        enabled: true
      oracledb.processes.usage:
        enabled: true
      oracledb.sessions.usage:
        enabled: true
      oracledb.sga.usage:
        enabled: true
      oracledb.shared_pool.utilization:
        enabled: true
      oracledb.sql_service.response.duration:
        enabled: true
      oracledb.sqlnet.io.transferred:
        enabled: true
      oracledb.tablespace_size.usage:
        enabled: true
      oracledb.transactions.usage:
        enabled: true
      oracledb.user_commits:
        enabled: true
      oracledb.user_rollbacks:
        enabled: true
```

**Enable Query performance, session, and wait metrics**

To populate data for the Query performance, Wait events, and Sessions pages, add the following configuration to your `otelcol-contrib` configuration file:

```yaml
receivers:
  oracledb:
    events:
      db.server.query_sample:
        enabled: true
      db.server.top_query:
        enabled: true
      db.server.session.wait_sample:
        enabled: true

    top_query_collection:
      max_query_sample_count: 1000
      top_query_count: 200
      collection_interval: 60s
      allowed_comment_keys:
        - nr_service_guid

    query_sample_collection:
      max_rows_per_query: 100
      allowed_comment_keys:
        - nr_service_guid

    session_wait_event_collection:
      max_rows_per_query: 100
```

**Enable ASM diskgroup and disk metrics**

The Oracle Database receiver supports monitoring ASM (Automatic Storage Management) instances. The receiver collects critical storage health metrics, including disk group capacity, usable free space, offline disks, and physical disk read/write errors.

Run the following as a privileged Oracle user to grant access:

```sql
GRANT SELECT ON V_$ASM_DISKGROUP_STAT TO <username>;
GRANT SELECT ON V_$ASM_DISK_STAT TO <username>;
```

Add the following configuration to your `otelcol-contrib` configuration file. All 5 metrics are **disabled by default** (opt-in):

```yaml
receivers:
  oracledb:
    datasource: "oracle://otel:password@localhost:51521/XE"
    metrics:
      oracledb.asm.disk_group.free:
        enabled: true
      oracledb.asm.disk_group.capacity:
        enabled: true
      oracledb.asm.disk_group.usable_free:
        enabled: true
      oracledb.asm.disk_group.offline_disks:
        enabled: true
      oracledb.asm.disk.errors:
        enabled: true
```

For a description of these metrics, refer to the [metrics reference](https://docs.newrelic.com/docs/opentelemetry/database/oracle/metrics-reference/#asm).

## Restart the OpenTelemetry Collector [#restart]

Restart the OpenTelemetry Collector to apply the configuration changes:

```bash
sudo systemctl restart otelcol-contrib
```

## Related articles [#related-articles]

[Metrics reference](https://docs.newrelic.com/docs/opentelemetry/database/oracle/metrics-reference)

Learn about the available metrics collected by the NRDOT Collector.

[Troubleshooting](https://docs.newrelic.com/docs/opentelemetry/database/oracle/troubleshooting)

Learn how to troubleshoot your Oracle Database monitoring setup in New Relic.
