Our Oracle Database integration collects key performance metrics on databases, tablespaces, and memory by default. You can customize your configuration to collect even more metrics, giving you detailed characterization of database performance.
Read on to install the integration, and to see what data we collect.
Compatibility and requirements
Our integration is compatible with Oracle Database from versions 11.2 to 23.
Before installing the integration, make sure that you meet the following requirements:
- Linux distro compatible with infrastructure, except for RHEL/CentOS/OEL versions lower than 7.
- Install the infrastructure agent.
- Oracle Instant Client on the agent box.
- Oracle database with
ORACLE_HOME
configured to the correct directory for the root user. - Oracle database user with both CONNECT and SELECT privileges on the required global views.
- Oracle database with a
listener.ora
file configured to monitor from a remote connection. By default, Oracle Database only listens to localhost.
중요
ARM64 architecture is not supported.
Install and activate
To install the Oracle Database integration:
Install the infrastructure agent, and replace the
INTEGRATION_FILE_NAME
variable withnri-oracledb
.Change directory to the integrations folder:
bash$cd /etc/newrelic-infra/integrations.dCopy the sample configuration file:
bash$sudo cp oracledb-config.yml.sample oracledb-config.ymlEdit the
oracledb-config.yml
file as described in the configuration settings.
Additional notes:
- Advanced: It's also possible to install the integration from a tarball file. This gives you full control over the installation and configuration process.
- On-host integrations do not automatically update. For best results, regularly update the integration package and the infrastructure agent.
이 문서가 설치하는데 도움이 되셨나요?
Configuration
Enabling your Oracle DB Server
In the Oracle database, execute the following statements to create a new user and assign user privileges. USERNAME and similar user-specific values must be replaced.
Choose which kind of database you have. For assistance with user maintenance questions, consult the Oracle docs or contact your system or database administrator.
Grant
CONNECT
privileges to the user:GRANT CONNECT TO USERNAME;Grant
SELECT
privileges to the user on the following global views:cdb_data_files
cdb_pdbs
cdb_users
gv_$sysmetric
gv_$pgastat
gv_$instance
gv_$filestat
gv_$parameter
sys.dba_data_files
gv_$session
gv_$sesstat
gv_$statname
gv_$rowcache
gv_$sga
gv_$sysstat
v_$database
gv_$librarycache
gv_$sqlarea
gv_$system_event
dba_tablespaces
gv_$session_wait
gv_$rollstat
v_$instance
Execute the following SQL statements together in one script, or individually:
GRANT SELECT ON cdb_data_files TO USERNAME;GRANT SELECT ON cdb_pdbs TO USERNAME;GRANT SELECT ON cdb_users TO USERNAME;GRANT SELECT ON gv_$sysmetric TO USERNAME;GRANT SELECT ON gv_$pgastat TO USERNAME;GRANT SELECT ON gv_$instance TO USERNAME;GRANT SELECT ON gv_$filestat TO USERNAME;GRANT SELECT ON gv_$parameter TO USERNAME;GRANT SELECT ON sys.dba_data_files TO USERNAME;GRANT SELECT ON DBA_TABLESPACES TO USERNAME;GRANT SELECT ON DBA_TABLESPACE_USAGE_METRICS TO USERNAME;GRANT SELECT ON gv_$session TO USERNAME;GRANT SELECT ON gv_$sesstat TO USERNAME;GRANT SELECT ON gv_$statname TO USERNAME;GRANT SELECT ON gv_$rowcache TO USERNAME;GRANT SELECT ON gv_$sga TO USERNAME;GRANT SELECT ON gv_$sysstat TO USERNAME;GRANT SELECT ON v_$database TO USERNAME;GRANT SELECT ON gv_$librarycache TO USERNAME;GRANT SELECT ON gv_$sqlarea TO USERNAME;GRANT SELECT ON gv_$system_event TO USERNAME;GRANT SELECT ON dba_tablespaces TO USERNAME;GRANT SELECT ON gv_$session_wait TO USERNAME;GRANT SELECT ON gv_$rollstat TO USERNAME;GRANT SELECT ON v_$instance TO USERNAME;
To collect PDB metrics, grant
gv$con_sysmetric
privileges by running:GRANT SELECT ON gv$con_sysmetric TO USERNAME;
Configure the integration
There are several ways to configure the integration, depending on how it was installed:
- If enabled via Amazon ECS: see Monitor services running on ECS.
- If installed on-host: edit the config in the integration's YAML config file,
oracledb-config.yml
.
An integration's YAML-format configuration is where you can place required login credentials and configure how data is collected. Which options you change depend on your setup and preference.
The configuration file has common settings applicable to all integrations like interval
, timeout
, inventory_source
. To read all about these common settings refer to our Configuration Format document.
중요
If you are still using our Legacy configuration/definition files please refer to this document for help.
Specific settings related to Oracle DB are defined using the env
section of the configuration file. These settings control the connection to your Oracle DB instance as well as other security settings and features. The list of valid settings is described in the next section of this document.
Oracle DB Instance Settings
The Oracle DB integration collects both Metrics(M) and Inventory(I) information. In the table, use the Applies To column for the settings available to each collection:
Setting | Description | Default | Applies To |
---|---|---|---|
SERVICE_NAME | The service name for the Oracle instance. | N/A | M/I |
HOSTNAME | Hostname or IP where Oracle DB is running. | 127.0.0.1 | M/I |
PORT | Port on which Oracle DB is listening. | 1521 | M/I |
USERNAME | Username for accessing the Oracle DB server. | N/A | M/I |
PASSWORD | Password for the given user. | N/A | M/I |
CONNECTION_STRING | A full connection string such as those found in | N/A | M/I |
ORACLE_HOME | Path to where | N/A | M/I |
TABLESPACES | A JSON array of tablespaces to collect. If omitted, it collects all tablespaces. If empty, it skips tablespace metrics collection. | [] | M |
IS_SYS_DBA | Indicates whether the authenticating user has SysDBA permissions. | false | M |
IS_SYS_OPER | Indicates whether the authenticating user has SysOper permissions. | false | M |
EXTENDED_METRICS | Indicates whether to collect extended metrics. Check which are extended metrics in the table below | false | M |
SKIP_METRICS_GROUPS | Collected metrics are grouped together depending on the query used to obtain the data.
These metric groups are listed here and can be skipped from collection by adding the name
of the group to | [] | M |
DISABLE_CONNECTION_POOL | Disable connection pooling. Use only if the integration is getting errors when trying to establish new connections to Oracle DB. | false | M |
MAX_OPEN_CONNECTIONS | Maximum number of simultaneous connections opened by the integration. | 5 | M |
SYS_METRICS_SOURCE | Set it to | '' | M |
CUSTOM_METRICS_QUERY | A SQL query to collect custom metrics. See example below. | N/A | M |
CUSTOM_METRICS_CONFIG | YAML configuration with one or more SQL queries to collect custom metrics. See example below. | false | M |
METRICS | Set to | false | |
INVENTORY | Set to | false |
The values for these settings can be defined in several ways:
- Add the value directly to the configuration file. This is the most common way.
- Replace the values from environment variables using the
{{}}
notation. This requires infrastructure agent 1.14.0+. For more on this, see more on infrastructure agent passthrough environment variables. - Use secrets management to protect sensible information, such as passwords, so that it's not exposed in plain text on the configuration file. For more information, see secrets management.
Labels and custom attributes
You can also decorate your metrics with labels. Labels allow you to add key/value pair attributes to your metrics so that you can query, filter, or group your metrics.
Even though our default sample configuration file includes examples of labels, they're optional. You can remove, modify, or add new ones.
labels: env: production role: load_balancer
Example configurations
Find and use data
To find your integration data in New Relic, go to one.newrelic.com > All capabilities > Infrastructure > Third-party services and select one of the Oracle Database integration links.
Oracle Database data is attached to the following event types:
OracleDatabaseSample
OracleTablespaceSample
For more on how to find and use your data, see Understand integration data.
Metric data
The Oracle Database integration collects the following metric data attributes. Each metric name is prefixed with a category indicator and a period, such as disk.
or memory.
.
Database metrics
These attributes can be found by querying the OracleDatabaseSample
event type.
Metric | Description | Extended |
---|---|---|
| Active parallel sessions. | |
| Active serial sessions. | |
| Average active sessions. | |
| Checkpoints per second. | |
| Background CPU usage per second. | |
| Background time per second. | |
| DB block changes per second. | |
| DB block changes per transaction. | |
| DB block changes per user call. | |
| DB block gets per second. | |
| DB block gets per transaction. | |
| DB block gets per user call. | |
| Branch node splits per second. | |
| Branch node splits per transaction. | |
| Consistent read changes per second. | |
| Consistent read changes per transaction. | |
| Consistent read gets per second. | |
| Consistent read gets per transaction. | |
| CPU time ratio. | |
| CPU usage per second. | |
| CPU usage per transaction. | |
| CR blocks created per second. | |
| CR blocks created per transaction. | |
| CR undo records applied per second. | |
| CR undo records applied per transaction. | |
| Current logons count. | |
| Current open cursors count. | |
| Cursor cache hit ratio. | |
| Database time per second. | |
| DBWR checkpoints per second. | |
| Enqueue deadlocks per second. | |
| Enqueue deadlocks per transaction. | |
| Enqueue requests per second. | |
| Enqueue requests per transaction. | |
| Enqueue timeouts per second. | |
| Enqueue timeouts per transaction. | |
| Enqueue waits per second. | |
| Enqueue waits per transaction. | |
| Executions per second. | |
| Executions per transaction. | |
| Executions per user call. | |
| Full index scans per second. | |
| Full index scans per transaction. | |
| GC CR block received per second. | |
| GC CR block received per transaction. | |
| GC current block received per second. | |
| GC current block received per transaction. | |
| Global cache average CR get time. | |
| Global cache average current get time. | |
| Hard parse count per second. | |
| Hard parse count per transaction. | |
| Host CPU usage per second. | |
| Host CPU utilization (percentage). | |
| Leaf node splits per second. | |
| Leaf node splits per transaction. | |
| Library cache hit ratio. | |
| Library cache miss ratio. | |
| Logical reads per second. | |
| Logical reads per transaction. | |
| Logons per second. | |
| Logons per transaction. | |
| Long table scans per second. | |
| Long table scans per transaction. | |
| Open cursors per second. | |
| Open cursors per transaction. | |
| Current OS load. | |
| Parse failure count per second. | |
| Parse failure count per transaction. | |
| PGA cache hit percentage. | |
| Process limit percentage. | |
| Recursive calls per second. | |
| Recursive calls per transaction. | |
| Redo writes per second. | |
| Redo writes per transaction. | |
| Response time per transaction. | |
| Row cache hit ratio. | |
| Row cache miss ratio. | |
| Rows per sort. | |
| Session count. | |
| Session limit percentage. | |
| Shared pool free percentage. | |
| Soft parse ratio. | |
| Total sorts per user call. | |
| SQL service response time. | |
| Streams pool usage percentage. | |
| Total table scans per user call. | |
| Total index scans per second. | |
| Total index scans per transaction. | |
| Total parse count per second. | |
| Total parse count per transaction. | |
| Total table scans per second. | |
| Total table scans per transaction. | |
| Transactions per logon. | |
| User calls per second. | |
| User calls per transaction. | |
| User calls ratio. | |
| User commits percentage. | |
| User commits per second. | |
| User limit percentage. | |
| User rollbacks per transaction. | |
| User rollbacks per second. | |
| User rollback undo records applied per second. | |
| User rollback undo records applied per transaction. | |
| Database wait time ratio. | |
| Captured Used Calls | |
| Execute Without Parse Ratio | |
| Logons Per Sec | |
| Physical Read Bytes Per Sec | |
| Pysical Read IO Requests Per Sec | |
| Pysical Reads Per Sec | |
| Physical Writes Bytes Per Sec | |
| Physical Writes Per Sec | |
| Number of block reads. | |
| Number of block writes. | |
| Logical reads per user call. | |
| Physical reads direct lobs per second. | |
| Physical writes direct lobs per second. | |
| Physical read total bytes per second. | |
| Physical read total I/O requests per second. | |
| Physical reads direct per second. | |
| Physical write total bytes per second. | |
| Physical write I/O requests per second. | |
| Physical writes direct per second. | |
| Physical write total I/O requests per second. | |
| Total number of physical reads. | |
| Amount of file read time. | |
| Disk sort per second. | |
| Disk sort per transaction. | |
| Temp space used. | |
| Total number of physical writes. | |
| Amount of file write time. | |
| Number of accounts whose | |
| Number of long running (> 60s) queries. | |
| Buffer cache hit ratio. | |
| Global cache blocks corrupted. | |
| Global cache blocks lost. | |
| Current amount of PGA memory allocated by the instance. | |
| Maximum size of a work area executed in automatic mode. | |
| Number of bytes of PGA memory in all processes that could be freed back to the operating system. | |
| Indicates how much PGA memory is currently consumed by work areas. This number can be used to determine how much memory is consumed by other consumers of the PGA memory (for example, PL/SQL or Java). | |
| Redo allocation hit ratio. | |
| Redo generated bytes per second. | |
| Redo generated bytes per transaction. | |
| Memory sorts ratio. | |
| I/O megabytes per second. | |
| I/O requests per second. | |
| Network traffic volume per second. | |
| Physical reads direct lobs per transaction. | |
| Physical writes direct lobs per transaction. | |
| Physical reads direct per transaction. | |
| Physical reads per transaction. | |
| Physical writes direct per transaction. | |
| Physical writes per transaction. | |
| User transaction per second. | |
| Number of redo log file switch events. | |
| Number of redo log file switch events that need archiving. | |
| Number of redo log file switch event checkpoints that are incomplete. | |
| Number of redo log waits. | |
| Number of rollback segments gets. | |
| Ratio of waits for rollback segments. | |
| Number of rollback segments waits. | |
| Number of SGA buffer busy waits. | |
| SGA fixed size. | |
| Number of SGA free buffer inspected. | |
| Number of SGA free buffer waits. | |
| Hit ratio for the SGA. | |
| Retry ratio of allocations for the SGA log buffer. | |
| Redo allocation ratio for the SGA log buffer. | |
| Number of Redo entries in the SGA log buffer. | |
| Buffer space waits for the SGA log buffer. | |
| SGA Redo buffers, in bytes. | |
| Miss ratio for the SGA shared pool dictionary (dict) cache. | |
| Hit ratio for the SGA shared pool library cache. | |
| Reload ratio for the SGA shared pool library cache. | |
| SGA cacheable memory per statement, in bytes. | |
| SGA cacheable memory per user, in bytes. | |
| Total memory in the User Global Area (UGA). | |
| Sorts disk usage, in bytes. | |
| Sorts memory usage, in bytes. |
Tablespace metrics
The Oracle Database integration collects the following tablespace metrics. These attributes can be found by querying the OracleTablespaceSample
event type. Please note that tablespace usage metrics are not available for read-only standby databases - read more about this limitation in the Oracle Knowledgebase here.
Metric | Description | Extended |
---|---|---|
| Boolean for tablespace offline status. | |
| The number of PDB datafiles that are offline. | |
| The number of CDB datafiles that are offline. | |
| The number of PDB datafiles in a non-writable state. | |
| Consumed amount of tablespace in bytes. | |
| Total reserved tablespace in bytes. | |
| Ratio of used to total tablespace. |
Inventory data
The Oracle Database integration captures the configuration parameters of the Oracle database. The data is available on the Inventory page, under the config/oracledb source. For more about inventory data, see Understand integration data.
The integration captures data for the following Oracle Database configuration parameters:
Troubleshooting
Troubleshooting tips:
Check the source code
This integration is open source software. That means you can browse its source code and send improvements, or create your own fork and build it.