---
title: Install & configure NRDOT Collector for on-host CDB monitoring
source: https://docs.newrelic.com/docs/opentelemetry/database/oracle/host-cdb
---

> #### 💡 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/).

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](https://one.newrelic.com) > Integrations & Agents > Oracle (OpenTelemetry)** . This page covers the CLI install path only.

## Prerequisites [#prerequisites]

Before you begin, ensure you have the following:

-   Valid New Relic [license key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#ingest-license-key)
-   Supported architecture: Linux with AMD64 and ARM64
-   Network connectivity to [New Relic OTLP endpoint](https://docs.newrelic.com/docs/opentelemetry/best-practices/opentelemetry-otlp)
-   Oracle Database `19c` or later

### Enroll to preview [#enroll]

This integration is available as part of the New Relic public preview program. Contact your Organization Manager to opt in from the [Previews & Trials](https://one.newrelic.com/admin-portal/promotion-management/home) page.

## Install NRDOT Collector [#installation]

Select the appropriate installation distribution method for your Linux environment:

**For AMD64 architecture**

-   For Debian/Ubuntu system, run:

    ```bash
    NRDOT_VERSION=$(curl -s https://api.github.com/repos/newrelic/nrdot-collector-releases/releases/latest | grep '"tag_name":' | awk -F'"' '{print $4}') && curl -L "https://github.com/newrelic/nrdot-collector-releases/releases/download/${NRDOT_VERSION}/nrdot-collector_${NRDOT_VERSION}_linux_amd64.deb" --output nrdot-collector.deb && sudo dpkg -i nrdot-collector.deb
    ```
-   For RHEL/CentOS/OEL system, run:

    ```bash
    NRDOT_VERSION=$(curl -s https://api.github.com/repos/newrelic/nrdot-collector-releases/releases/latest | grep '"tag_name":' | awk -F'"' '{print $4}') && curl -L "https://github.com/newrelic/nrdot-collector-releases/releases/download/${NRDOT_VERSION}/nrdot-collector_${NRDOT_VERSION}_linux_x86_64.rpm" --output nrdot-collector.rpm && sudo rpm -ivh nrdot-collector.rpm
    ```

**For ARM64 architecture**

-   For Debian/Ubuntu system, run:

    ```bash
    NRDOT_VERSION=$(curl -s https://api.github.com/repos/newrelic/nrdot-collector-releases/releases/latest | grep '"tag_name":' | awk -F'"' '{print $4}') && curl -L "https://github.com/newrelic/nrdot-collector-releases/releases/download/${NRDOT_VERSION}/nrdot-collector_${NRDOT_VERSION}_linux_arm64.deb" --output nrdot-collector.deb && sudo dpkg -i nrdot-collector.deb
    ```
-   For RHEL/CentOS/OEL system, run:

    ```bash
    NRDOT_VERSION=$(curl -s https://api.github.com/repos/newrelic/nrdot-collector-releases/releases/latest | grep '"tag_name":' | awk -F'"' '{print $4}') && curl -L "https://github.com/newrelic/nrdot-collector-releases/releases/download/${NRDOT_VERSION}/nrdot-collector_${NRDOT_VERSION}_linux_arm64.rpm" --output nrdot-collector.rpm && sudo rpm -ivh nrdot-collector.rpm
    ```

## Configure database user [#database-user]

Create a monitoring user with necessary privileges for your multitenant Oracle Database. This requires creating a common user with the `C##` prefix.

1.  To set your current active container context to `CDB$ROOT`, execute the following statement as a `SYS` user:
    ```sql
    ALTER SESSION SET CONTAINER = CDB$ROOT;
    ```

2.  For multitenant databases:

    1.  Log in to the root database as an administrator.

    2.  To create a new user, run the following `CREATE USER` statement:

        ```sql
        CREATE USER c##<YOUR_DB_USERNAME> IDENTIFIED BY "<USER_PASSWORD>" CONTAINER=ALL;
        GRANT CREATE SESSION TO c##<YOUR_DB_USERNAME> CONTAINER=ALL;
        ```

        > #### 💡 TIP
        >
        > The newly created user'll be a common user with the `C##` prefix. The `C##` prefix is required for common users by Oracle.

3.  To allow the monitoring user to see every PDB's rows in container-data views, run the following statement as `SYSDBA` on the CDB root. This is required for per-PDB metrics and events.

    ```sql
    ALTER USER c##<YOUR_DB_USERNAME> SET CONTAINER_DATA=ALL CONTAINER=CURRENT;
    ```

    > #### 💡 TIP
    >
    > Ensure your `USER_PASSWORD` meets Oracle [new user password](https://docs.oracle.com/en/database/oracle/oracle-database/12.2/dbseg/keeping-your-oracle-database-secure.html#GUID-451679EB-8676-47E6-82A6-DF025FD65156) requirements.

## Grant monitoring privileges for multitenant database [#grant-privileges]

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.

```sql
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;
```

> #### 💡 TIP
>
> The `V_$ASM_DISKGROUP_STAT` and `V_$ASM_DISK_STAT` grants are only required if you want to collect [ASM diskgroup and disk metrics](https://docs.newrelic.com/docs/opentelemetry/database/oracle/metrics-reference/#asm).

## Configure NRDOT Collector [#configure-collector]

Configure the NRDOT Collector with your CDB-specific settings.

1.  Create the configuration file. The filename must be `oracle-config.yaml`.
    ```bash
    sudo nano /etc/nrdot-collector/oracle-config.yaml
    ```

2.  Add the configuration content below to the `oracle-config.yaml` file 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](https://docs.newrelic.com/docs/opentelemetry/database/oracle/config-reference/#cdb-full).

3.  Under the Events section, enable these event types to collect their metrics:

    | Event                           | Description                                                                               |
    | ------------------------------- | ----------------------------------------------------------------------------------------- |
    | `db.server.query_sample`        | Per-session active query samples capturing current SQL, wait state, and blocking details. |
    | `db.server.top_query`           | Top N SQL statements by CPU or elapsed time, including execution stats and query plans.   |
    | `db.server.session.wait_sample` | Per-session cumulative wait counts and durations from `v$session_event`.                  |

4.  Configure the collection settings for each event type:

    | Configuration Section           | Parameter                | Value |
    | ------------------------------- | ------------------------ | ----- |
    | `top_query_collection`          | `max_query_sample_count` | 1000  |
    | `top_query_collection`          | `top_query_count`        | 200   |
    | `top_query_collection`          | `collection_interval`    | 60s   |
    | `query_sample_collection`       | `max_rows_per_query`     | 100   |
    | `session_wait_event_collection` | `max_rows_per_query`     | 100   |

> #### 💡 TIP
>
> For more detailed information about New Relic OTLP endpoint configuration and OpenTelemetry best practices, refer to the [OpenTelemetry OTLP documentation](https://docs.newrelic.com/docs/opentelemetry/best-practices/opentelemetry-otlp/).

## Update NRDOT Collector configuration [#update]

Update the NRDOT Collector configuration to use your `oracle-config.yaml` file:

```bash
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.conf
```

> #### 💡 TIP
>
> You can also:
>
> -   [Configure multiple receivers](https://docs.newrelic.com/docs/opentelemetry/database/oracle/multi-receiver): To monitor multiple Oracle Database instances from one collector.
> -   [Configure SQL Query Receiver](https://docs.newrelic.com/docs/opentelemetry/database/capabilities/sql-query-receiver/): To collect custom metrics from your Oracle Database.
> -   [Link your Oracle Database with APM](https://docs.newrelic.com/docs/opentelemetry/database/capabilities/db-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](https://docs.newrelic.com/docs/opentelemetry/database/capabilities/db-apm/#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 [#restart-collector]

After updating your configuration, restart the NRDOT Collector:

```bash
sudo systemctl restart nrdot-collector.service
sudo systemctl status nrdot-collector.service
```

> #### 💡 TIP
>
> Always restart the NRDOT Collector after making configuration changes so the new settings take effect.

## Find and use your data [#find-use-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:

1.  Go to **<https://one.newrelic.com> > All Capabilities > Databases**.
2.  Set the search criteria as `instrumentation.provider = opentelemetry`.
3.  Select your Oracle Database from the list of entities.

## Related articles [#related-articles]

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

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

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

Learn about the available metrics collected by the NRDOT Collector.

[RDS instrumentation](https://docs.newrelic.com/docs/opentelemetry/database/oracle/rds)

Learn how to set up your Oracle Database for RDS monitoring in New Relic.
