Datadog-Oracle

Overview

Get metrics from Oracle Database servers in real time to visualize and monitor availability and performance.

Setup

Installation

Install the dd-check-oracle package manually or with your favorite configuration manager.

In order to use the Oracle integration you must install the Oracle Instant Client libraries. Due to licensing restrictions we are unable to include these libraries in our agent, but you can download them directly frrom Oracle.

You will need to install the Instant Client Basic and SDK packages.

After you have installed the Instant Client libraries, ensure that the runtime linker can find the libraries. For example, using 'ldconfig:

# Put the library location in an ld configuration file.
sudo sh -c "echo /usr/lib/oracle/12.2/client64/lib > \
    /etc/ld.so.conf.d/oracle-instantclient.conf"

# Update the bindings.
sudo ldconfig

Alternately, you can update your LD_LIBRARY_PATH to include the location of the Instant Client libraries. For example:

mkdir -p /opt/oracle/ && cd /opt/oracle/

# Download Oracle Instant Client (example dir: /opt/oracle).
unzip /opt/oracle/instantclient-basic-linux.x64-12.1.0.2.0.zip
unzip /opt/oracle/instantclient-sdk-linux.x64-12.1.0.2.0.zip

export LD_LIBRARY_PATH=/opt/oracle/instantclient/lib:$LD_LIBRARY_PATH

Finally, you will need to create a read-only datadog user with proper access to your Oracle Database Server. Connect to your Oracle database with an administrative user (e.g. SYSDBA or SYSOPER) and run:

-- Enable Oracle Script.
ALTER SESSION SET "_ORACLE_SCRIPT"=true;

-- Create the datadog user. Replace the password placeholder with a secure password.
CREATE USER datadog IDENTIFIED BY <password>;

-- Grant access to the datadog user.
GRANT CONNECT TO datadog;
GRANT SELECT ON gv_$sysmetric TO datadog;

Configuration

Edit the oracle.yaml file to point to your server and port, set the masters to monitor. See the sample oracle.yaml for all available configuration options.

Configuration Options: * server (Required) - The IP address or hostname of the Oracle Database server. * service_name (Required) - The Oracle Database service name. To view the services available on your server, run the following query: SELECT value FROM v$parameter WHERE name='service_names'. * user (Required) - If you followed the instructions above, set this to the read-only user datadog. Otherwise set it to a user with sufficient privileges to connect to the database and read system metrics. * password (Required) - The password for the user account. * tags (Optional) - A list of tags applied to all metrics collected. Tags may be simple strings or key-value pairs.

Validation

Run the Agent’s info subcommand and look for oracle under the Checks section:

Checks
======

    oracle
    -----------
      - instance #0 [OK]
      - Collected 18 metrics, 0 events & 1 service checks

Compatibility

The Oracle check is currently compatible with Linux and macOS.

Data Collected

Metrics

oracle.buffer_cachehit_ratio
(gauge)
Ratio of buffer cache hits
shown as fraction
oracle.cursor_cachehit_ratio
(gauge)
Ratio of cursor cache hits
shown as fraction
oracle.library_cachehit_ratio
(gauge)
Ratio of library cache hits
shown as fraction
oracle.shared_pool_free
(gauge)
shared pool free memory %
shown as percent
oracle.physical_reads
(gauge)
physical reads per sec
shown as reads
oracle.physical_writes
(gauge)
physical writes per sec
shown as writes
oracle.enqueue_timeouts
(gauge)
enqueue timeouts per sec
shown as timeouts
oracle.gc_cr_receive_time
(gauge)
GC CR receive time
shown as blocks
oracle.cache_blocks_corrupt
(gauge)
corrupt cache blocks
shown as blocks
oracle.cache_blocks_lost
(gauge)
lost cache blocks
shown as blocks
oracle.logons
(gauge)
number of logon attempts
shown as attempts
oracle.active_sessions
(gauge)
number of active sessions
shown as sessions
oracle.long_table_scans
(gauge)
number of long table scans per sec
shown as scans
oracle.service_response_time
(gauge)
service response time
shown as secs
oracle.user_rollbacks
(gauge)
number of user rollbacks
shown as operations
oracle.sorts_per_user_call
(gauge)
sorts per user call
shown as sorts
oracle.rows_per_sort
(gauge)
rows per sort
shown as rows
oracle.disk_sorts
(gauge)
disk sorts per second
shown as operations
oracle.memory_sorts_ratio
(gauge)
memory sorts ratio
shown as fraction
oracle.database_wait_time_ratio
(gauge)
memory sorts per second
shown as fraction
oracle.session_limit_usage
(gauge)
session limit usage
shown as percent
oracle.session_count
(gauge)
session count
shown as session
oracle.temp_space_used
(gauge)
temp space used
shown as bytes
oracle.tablespace.used
(gauge)
tablespace used
shown as bytes
oracle.tablespace.size
(gauge)
tablespace size
shown as bytes
oracle.tablespace.in_use
(gauge)
tablespace in-use
shown as fraction

Events

The Oracle Database check does not include any events at this time.

Service Checks

The Oracle Database integration includes the service check oracle.can_connect which will verify the database is available and accepting connections.

Troubleshooting

Need help? Contact Datadog Support.

Further Reading

Learn more about infrastructure monitoring and all our integrations on our blog