Collect data from Oracle Database

Configure the Splunk Distribution of OpenTelemetry Collector to collect metrics and events from your Oracle Database instance.

Splunk Database Monitoring supports these Oracle Database versions and platforms:

  • Versions: 2019

  • Platforms: AWS RDS, Oracle Real Application Clusters (RAC), or self-hosted

Note: For Oracle RAC deployments, you must set up a connection to each node in the cluster separately.
  1. Deploy a supported OpenTelemetry collector if it's not already deployed.
  2. Configure the oracledb receiver to collect infrastructure metrics from your Oracle Database instance. t
  3. Give the following permissions to the Oracle Database user:
    Self-hosted Oracle Database
    CODE
    GRANT SELECT ON V_$SQL TO username;
    GRANT SELECT ON V_$SQL_PLAN TO username;
    GRANT SELECT ON DBA_PROCEDURES TO username;
    AWS RDS Oracle Database
    CODE
    EXEC rdsadmin.rdsadmin_util.grant_sys_object('V_$SQL', 'username', 'SELECT', p_grant_option => FALSE);
    EXEC rdsadmin.rdsadmin_util.grant_sys_object('V_$SQL_PLAN', 'username', 'SELECT', p_grant_option => FALSE);
    EXEC rdsadmin.rdsadmin_util.grant_sys_object('DBA_PROCEDURES', 'username', 'SELECT', p_grant_option => FALSE);
  4. Enable Database Monitoring by modifying your OpenTelemetry Collector configuration.
    1. In your collector's YAML file, add additional configuration to the oracledb receiver:

      The example below shows the minimum required configuration, but you can add other options. See the community (OSS) OpenTelemetry Collector oracledb README.

      Important:

      In the Splunk Distribution of OpenTelemetry Collector, the following oracledb options have default values that are sufficient for database monitoring needs:

      • collection_interval (Default: 10s)
      • query_sample_collection.max_rows_per_query (Default: 100)

      • top_query_collection.collection_interval (Default: 60s)
      • top_query_collection.max_query_sample_count (Default: 1000)

      The Splunk Distribution of OpenTelemetry Collector uses carefully selected default values to support database monitoring without affecting the performance of the database or the collector. If you increase these values you might adversely affect the performance of your database or collector, and this could result in ingest throttling.

      CODE
      receivers:
        oracledb:
          ...
          events:
            db.server.query_sample:
              enabled: true
            db.server.top_query:
              enabled: true
    2. Add an additional exporter named dbmon.
      CODE
      exporters:
        otlphttp/dbmon:
          headers:
            X-SF-Token: your-splunk-access-token
            X-splunk-instrumentation-library: dbmon
          logs_endpoint: https://ingest.<your-splunk-realm>.signalfx.com/v3/event
          sending_queue:
            batch:
              flush_timeout: 15s
              max_size: 10485760 # 10 MiB
              sizer: bytes
    3. Add a new logs pipeline named dbmon.
      CODE
      service:
        pipelines:
          logs/dbmon:
            receivers:
              - oracledb
            processors:
              - memory_limiter
              - batch
              - resourcedetection
            exporters:
              - otlphttp/dbmon

      The resourcedetection processor is optional. If you need it, add to the logs/dbmon pipeline in the order shown in the example.

    4. Restart the collector.

      The command to restart the collector varies depending on which collector you deployed, which platform you deployed it on, and what tool you used to deploy it. For the Splunk Distribution of the OpenTelemetry Collector deployed on Kubernetes platforms with Helm, the restart command is:

      CODE
      helm upgrade your-splunk-otel-collector splunk-otel-collector-chart/splunk-otel-collector -f your-override-values.yaml
      where splunk-otel-collector-chart is the name you gave to the Helm chart in the helm repo add splunk-otel-collector-chart https://signalfx.github.io/splunk-otel-collector-chart command.

Your Oracle Database instance should now be visible as a datastore in Splunk IM (Infrastructure > Infrastructure monitoring > Overview)