---
title: Install & configure NRDOT for Oracle monitoring with Chef
source: https://docs.newrelic.com/docs/opentelemetry/db360/oracle/chef
---

You can install and configure the NRDOT Collector for Oracle Database monitoring using the `newrelic-install` Chef cookbook. The cookbook installs the collector, creates the monitoring database user, and configures the collector when you run the `newrelic-install::default` recipe.

## Prerequisites [#prerequisites]

-   A New Relic account with a valid [license key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#overview-keys).
-   A New Relic [account ID](https://docs.newrelic.com/docs/accounts/accounts-billing/account-structure/account-id).
-   Oracle Database 19c or later.
-   Chef 15 or later.
-   For self-hosted Oracle: Oracle Linux 7, 8, or 9, with SSH access (with agent forwarding) to the Oracle Database host where the SSH user can run `sudo su - oracle` without a password prompt.
-   For Oracle on AWS RDS: a collector host running Debian/Ubuntu or CentOS/RHEL/OEL.
-   For Oracle Autonomous Database (ADB): a collector host running Debian/Ubuntu or CentOS/RHEL/OEL, with Oracle Instant Client (`sqlplus`) installed and on `PATH`; 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 node.

## Download the Chef cookbook [#download-cookbook]

Download the `newrelic-install` [Chef cookbook](https://supermarket.chef.io/cookbooks/newrelic-install) from the Chef Supermarket to your chef-repo directory:

```bash
knife supermarket install newrelic-install
```

## Replace the default attributes [#configure]

Replace the default attributes in `attributes/default.rb` with your account details:

**Self-hosted Oracle Database**

This cookbook monitors one or more Oracle Database instances (each reachable via SSH) from a single collector. Instead of a single host/container/credential set, it reads an instances file (YAML) that must already exist on the node, listing every instance to monitor, and optionally a secrets file to pin monitoring-user passwords instead of auto-generating them. See the [CLI install](https://docs.newrelic.com/docs/opentelemetry/db360/oracle/cli/#install) for the exact file formats.

```ruby
default['newrelic_install']['NEW_RELIC_API_KEY']    = <API key>
default['newrelic_install']['NEW_RELIC_ACCOUNT_ID'] = <Account ID>
default['newrelic_install']['NEW_RELIC_REGION']     = <Region>
default['newrelic_install']['targets'] = [
  'nrdot-collector-oracle'
]
default['newrelic_install']['env']['NR_CLI_ORACLE_INSTANCES_FILE'] = <path to the instances YAML file on the node>
default['newrelic_install']['env']['NR_CLI_ORACLE_SECRETS_FILE']   = <optional path to a secrets file pinning monitoring passwords, on the node>
default['newrelic_install']['env']['NR_CLI_ORACLE_CONFIG_PRESET']  = <1 Basic, 2 Advanced, default 1>
# See all available targets at: https://github.com/newrelic/chef-install
```

| Attribute (under `env`)        | Description                                                                                                                                                                                             | Default |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `NR_CLI_ORACLE_INSTANCES_FILE` | Required. Path to the instances YAML file, already present on the node.                                                                                                                                 | None    |
| `NR_CLI_ORACLE_SECRETS_FILE`   | Optional. Path to a secrets file (`KEY=VALUE`) pinning `NR_CLI_ORACLE_LOGIN_PASSWORD_<i>` per instance, already present on the node. Leave unset to auto-generate a random password for every instance. | None    |
| `NR_CLI_ORACLE_CONFIG_PRESET`  | NRDOT configuration: 1 for Basic 2 for Advanced                                                                                                                                                         | `1`     |

> #### 💡 TIP
>
> No default attribute values are shipped for these variables. Set the ones relevant to your target explicitly via `default['newrelic_install']['env'][...]`.

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

**Oracle Database on AWS RDS**

This cookbook monitors one or more RDS Oracle endpoints from a single collector, using the same instances file / secrets file pattern as self-hosted (both files must already exist on the node).

```ruby
default['newrelic_install']['NEW_RELIC_API_KEY']    = <API key>
default['newrelic_install']['NEW_RELIC_ACCOUNT_ID'] = <Account ID>
default['newrelic_install']['NEW_RELIC_REGION']     = <Region>
default['newrelic_install']['targets'] = [
  'nrdot-collector-oracle-rds'
]
default['newrelic_install']['env']['NR_CLI_ORACLE_INSTANCES_FILE'] = <path to the instances YAML file on the node>
default['newrelic_install']['env']['NR_CLI_ORACLE_SECRETS_FILE']   = <path to the secrets file (KEY=VALUE per instance) on the node>
default['newrelic_install']['env']['NR_CLI_ORACLE_CONFIG_PRESET']  = <1 Basic, 2 Advanced, default 1>
# See all available targets at: https://github.com/newrelic/chef-install
```

| Attribute (under `env`)        | Description                                                                                                                                                                                                    | Default |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `NR_CLI_ORACLE_INSTANCES_FILE` | Required. Path to the instances YAML file, already present on the node.                                                                                                                                        | None    |
| `NR_CLI_ORACLE_SECRETS_FILE`   | Required. Path to the secrets file (`KEY=VALUE`, one RDS master username/password pair per instance; optionally `NR_CLI_ORACLE_LOGIN_PASSWORD_<i>` to pin a monitoring password), already present on the node. | None    |
| `NR_CLI_ORACLE_CONFIG_PRESET`  | NRDOT configuration: 1 for Basic 2 for Advanced                                                                                                                                                                | `1`     |

> #### 💡 TIP
>
> No default attribute values are shipped for these variables. Set the ones relevant to your target explicitly via `default['newrelic_install']['env'][...]`.

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

**Oracle Autonomous Database (ADB)**

This cookbook monitors one or more Oracle Autonomous Database (ADB) instances from a single collector, using the same instances file / secrets file pattern as RDS (both files must already exist on the node, and each instance also needs its own downloaded, unzipped Oracle Wallet on that node).

```ruby
default['newrelic_install']['NEW_RELIC_API_KEY']    = <API key>
default['newrelic_install']['NEW_RELIC_ACCOUNT_ID'] = <Account ID>
default['newrelic_install']['NEW_RELIC_REGION']     = <Region>
default['newrelic_install']['targets'] = [
  'nrdot-collector-oracle-adb'
]
default['newrelic_install']['env']['NR_CLI_ORACLE_INSTANCES_FILE'] = <path to the instances YAML file on the node>
default['newrelic_install']['env']['NR_CLI_ORACLE_SECRETS_FILE']   = <path to the secrets file (KEY=VALUE per instance) on the node>
# See all available targets at: https://github.com/newrelic/chef-install
```

| Attribute (under `env`)        | Description                                                                                                                                                                                                   | Default |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `NR_CLI_ORACLE_INSTANCES_FILE` | Required. Path to the instances YAML file, already present on the node. Each instance entry also needs `wallet_dir`: the path to that instance's unzipped Oracle Wallet.                                      | 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), already present on the node. | None    |

> #### 💡 TIP
>
> No default attribute values are shipped for these variables. Set the ones relevant to your target explicitly via `default['newrelic_install']['env'][...]`.

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

## Upload the Chef cookbook [#upload-cookbook]

Upload the `newrelic-install` Chef cookbook to your Chef server:

```bash
knife cookbook upload newrelic-install
```

## Update the run list [#run-list]

Add the `newrelic-install` recipe to the run list of a node:

```json
"run_list": [
  "recipe[newrelic-install]"
]
```

To find your Oracle Database entity in New Relic, see [Find and use your data](https://docs.newrelic.com/docs/opentelemetry/db360/oracle/introduction/#find).
