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:
$cat > ~/adb-instances.yml << 'EOF'
$ - host: adb1.adb.us-ashburn-1.oraclecloud.com
$ wallet_dir: /home/opc/wallet1
wallet_dir is the directory where that instance's wallet was unzipped (must contain cwallet.sso and sqlnet.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:
$cat > ~/adb-secrets.env << 'EOF'
$NR_CLI_ORACLE_ADMIN_USER_1=ADMIN
$NR_CLI_ORACLE_ADMIN_PASSWORD_1=YourAdminPassword1
$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-adb
The 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 |
|---|
NR_CLI_ORACLE_INSTANCES_FILE
| Required. Path to the instances YAML file. | None |
NR_CLI_ORACLE_SECRETS_FILE
| Required. Path to the secrets file (KEY=VALUE, one ADB admin username/password pair per instance; optionally NR_CLI_ORACLE_LOGIN_PASSWORD_<i> to pin a monitoring password instead of auto-generating one: ADB requires 12-30 characters with at least one uppercase letter, one lowercase letter, and one digit). | None |
Sugerencia
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.
Sugerencia
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.