You can install and configure the NRDOT Collector for Oracle Database monitoring using the New Relic CLI. The CLI installs the collector, creates the monitoring database user, and configures the collector in a single command.
Prerequisites
- A New Relic account with a valid license key.
- A New Relic account ID.
- Oracle Database 19c or later.
- For self-hosted Oracle: Oracle Linux 7, 8, or 9, with
curlandsystemdinstalled, and SSH access (with agent forwarding) to the Oracle Database host where the SSH user can runsudo su - oraclewithout a password prompt. - For Oracle on AWS RDS: a collector host running Debian/Ubuntu or CentOS/RHEL/OEL, with
curlandsystemdinstalled, and network connectivity from the collector host to the RDS Oracle endpoint. - For Oracle Autonomous Database (ADB): a collector host running Debian/Ubuntu or CentOS/RHEL/OEL, with
curl,systemd, and Oracle Instant Client (sqlplus) installed and onPATH; each instance's egress IP allowed in its ADB access control list; and each instance's Oracle Wallet downloaded and unzipped to its own directory on the collector host.
Install and configure the NRDOT Collector
This recipe monitors one or more Oracle Database instances (each reachable via SSH) from a single collector. Instead of prompting for a single host/container/credential set, it reads an instances file (YAML) listing every instance to monitor, and optionally a secrets file to pin specific monitoring-user passwords instead of auto-generating them.
Before you run this command, have ready:
- SSH access (with agent forwarding) to every Oracle Database host listed, where each
ssh_usercan runsudo su - oraclewithout a password prompt - Container type per instance (CDB for all PDBs, or a single PDB name)
- CDB or PDB service name per instance
- Whether you want Basic or Advanced metrics
Create the instances file. Add one entry per Oracle Database instance you want this collector to monitor; just one entry if you're only monitoring a single instance:
bash$cat > ~/oracle-instances.yml << 'EOF'$instances:$- host: dbhost1.example.com$port: 1521$ssh_user: opc$container_type: 1$pdb_name:$service: ORCLCDB$login_name: newrelic$EOFcontainer_typeis1for CDB (monitors all PDBs, creates a commonc##<login_name>user) or2for a single PDB (pdb_namerequired only then). Enterlogin_namewithout thec##prefix: the recipe adds it for you in CDB mode.(Optional) Create a secrets file to pin a fixed monitoring-user password per instance instead of letting the recipe auto-generate one. Self-hosted Oracle needs no admin credentials here. The monitoring user is created via SSH and OS-authenticated SYSDBA access:
bash$umask 077$cat > ~/oracle-secrets.env << 'EOF'$NR_CLI_ORACLE_LOGIN_PASSWORD_1=SomeFixedPassword1$EOF$chmod 600 ~/oracle-secrets.envLeave the secrets file path blank (or point it at a file that doesn't exist) to auto-generate a random password for every instance instead.
Run this from a host with SSH access (with agent forwarding) to every Oracle Database host listed in your instances file:
$curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash && sudo NEW_RELIC_API_KEY=INSERT_YOUR_API_KEY NEW_RELIC_ACCOUNT_ID=INSERT_YOUR_ACCOUNT_ID NEW_RELIC_REGION=INSERT_YOUR_REGION /usr/local/bin/newrelic install -n nrdot-collector-oracleThe CLI prompts interactively for the following variables. You can also set them ahead of time as environment variables to run non-interactively.
Variable | Description | Default |
|---|---|---|
| Required. Path to the instances YAML file. | None |
| Optional. Path to a secrets file ( | None |
| NRDOT configuration:
|
|
Tip
To monitor more than one Oracle Database instance from this collector, add more entries to the instances file. An instance that fails its checks is skipped with a logged reason rather than aborting the whole install. Re-running against an instance that already has a monitoring user prompts interactively to reuse it or create a new one (this one step isn't fully scriptable).
This recipe monitors one or more RDS Oracle endpoints from a single collector, using an instances file plus a secrets file.
Before you run this command, have ready:
- RDS Oracle endpoint, listener port, and DB service name for every instance
- RDS master username and password for every instance
- Whether you want Basic or Advanced metrics
Create the instances file (one entry per RDS Oracle endpoint you want this collector to monitor, still just one entry if you're only monitoring a single instance):
bash$cat > ~/oracle-instances.yml << 'EOF'$instances:$- host: rds-orders.abcdef123.us-east-1.rds.amazonaws.com$port: 1521$service: ORDERSDB$login_name: newrelic$EOFCreate the secrets file with the RDS master username and password for each instance, indexed to match the instances file's order. You can optionally pin a fixed monitoring-user password per instance too. Leave it out to auto-generate one:
bash$umask 077$cat > ~/oracle-secrets.env << 'EOF'$NR_CLI_ORACLE_ADMIN_USER_1=admin$NR_CLI_ORACLE_ADMIN_PASSWORD_1=YourMasterPassword1$EOF$chmod 600 ~/oracle-secrets.env
$curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash && sudo NEW_RELIC_API_KEY=INSERT_YOUR_API_KEY NEW_RELIC_ACCOUNT_ID=INSERT_YOUR_ACCOUNT_ID NEW_RELIC_REGION=INSERT_YOUR_REGION /usr/local/bin/newrelic install -n nrdot-collector-oracle-rdsThe CLI prompts interactively for the following variables. You can also set them ahead of time as environment variables to run non-interactively.
Variable | Description | Default |
|---|---|---|
| Required. Path to the instances YAML file. | None |
| Required. Path to the secrets file ( | None |
| NRDOT configuration:
|
|
Tip
To monitor more than one RDS Oracle endpoint from this collector, add more entries to the instances file and matching numbered credentials to the secrets file. An instance that fails its checks is skipped with a logged reason rather than aborting the whole install.
This recipe monitors one or more Oracle Autonomous Database (ADB) instances from a single collector, using an instances file plus a secrets file. Each instance connects over mutual TLS (ADB's default) using its own downloaded wallet. Don't share one wallet directory between instances.
Before you run this command, have ready:
- For each instance: its connection string (
host,port,service, from the ADB console's Database connection > Connection strings) - For each instance: its downloaded Oracle Wallet (ADB console's Database connection > Download wallet), unzipped to its own directory on the collector host
- ADB admin (
ADMIN) username and password for every instance
Create the instances file. Add one entry per ADB instance you want this collector to monitor; just one entry if you're only monitoring a single instance:
bash$cat > ~/adb-instances.yml << 'EOF'$instances:$- host: adb1.adb.us-ashburn-1.oraclecloud.com$port: 1522$service: myadb1_high$login_name: newrelic$wallet_dir: /home/opc/wallet1$EOFwallet_diris the directory where that instance's wallet was unzipped (must containcwallet.ssoandsqlnet.ora); an instance with a missing or invalid wallet directory is skipped rather than failing the whole install.Create the secrets file with the ADB admin username and password for each instance, indexed to match the instances file's order. You can optionally pin a fixed monitoring-user password per instance too. Leave it out to auto-generate one:
bash$umask 077$cat > ~/adb-secrets.env << 'EOF'$NR_CLI_ORACLE_ADMIN_USER_1=ADMIN$NR_CLI_ORACLE_ADMIN_PASSWORD_1=YourAdminPassword1$EOF$chmod 600 ~/adb-secrets.env
Run this from a host that has sqlplus (Oracle Instant Client) on PATH and network connectivity (mTLS) to every ADB instance listed:
$curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash && sudo NEW_RELIC_API_KEY=INSERT_YOUR_API_KEY NEW_RELIC_ACCOUNT_ID=INSERT_YOUR_ACCOUNT_ID NEW_RELIC_REGION=INSERT_YOUR_REGION /usr/local/bin/newrelic install -n nrdot-collector-oracle-adbThe CLI prompts interactively for the following variables. You can also set them ahead of time as environment variables to run non-interactively.
Variable | Description | Default |
|---|---|---|
| Required. Path to the instances YAML file. | None |
| Required. Path to the secrets file ( | None |
Tip
There's no NR_CLI_ORACLE_CONFIG_PRESET for ADB: it's a fully managed service with no host to collect host-level metrics from.
Tip
To monitor more than one ADB instance from this collector, add more entries to the instances file and matching numbered credentials to the secrets file. An instance that fails its checks is skipped with a logged reason rather than aborting the whole install.
To find your Oracle Database entity in New Relic, see Find and use your data.