The Observability Blog

Categories:
  • Google Cloud
  • Log Management
  • Metrics

How to monitor Oracle DB with Google Cloud Platform

Paul Stefanski headshot
by Paul Stefanski on
October 5, 2022

Monitor Oracle DB in Google Cloud Platform with the Google Ops Agent. The Ops Agent is available on GitHub, and makes it easy to collect and ship telemetry from dozens of sources directly to your Google Cloud Platform. You can check it out here!

Below are steps to get up and running quickly with observIQ’s Google Cloud Platform integrations, and monitor metrics and logs from Oracle DB in your Google Cloud Platform. You can check out Google’s documentation for using the Ops Agent for Oracle DB here: https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/install-index

What signals matter?

Oracle DB is an enterprise database service which is often used for large deployments, so managing resources can be tedious or difficult. Oracle Enterprise Manager is Oracle’s solution for monitoring Oracle DB, but if you want to monitor multiple environments with the same tool or simply avoid the cost of Oracle Enterprise Manager, then using the ops agent with Google Cloud Platform is an ideal solution. The ops agent leverages the sqlquery receiver from OpenTelemetry with queries that are specific to the ops agent. The receiver collects 27 metrics, and audit and alert logs. There are a few general areas worth paying attention to:

  • Audit Logs
    • Audit logs are highly tuneable. When configured properly to your needs, they provide valuable data about the activity in your environment
  • Service Response Time
    • oracle.service.response_time
    • The average query response time – slowdowns may indicate underlying performance issues
  • Waits and Wait Timeouts
    • oracle.wait.count
    • oracle.wait.timeouts
    • Significant increases in waits and timeouts often indicate underlying performance issues
  • Rollbacks
    • oracle.user.rollbacks
    • Unexpected rollbacks always indicate an underlying issue, often with data integrity

All of the above categories can be gathered with the Oracle DB receiver – so let’s get started.

Before you begin

If you don’t already have an Ops Agent with the latest Oracle DB receiver installed, you’ll need to do that first. Check out the Google Cloud Platform Ops Agent documentation for installation methods, including the one-line installer.

Configuring the Oracle DB receiver for Metrics and Logs

Navigate to your Ops Agent configuration file. You’ll find it in the following location: 

  •  /etc/google-cloud-ops-agent/config.yaml (Linux)

Edit the configuration file for Oracle DB metrics as shown below:

metrics:
  receivers:
    oracledb:
      type: oracledb
      endpoint: myhost.domain:1111
      wallet: /my/oracle/wallet/path here/
      insecure: false
      insecure_skip_verify: false
      password: p@ssword
      username: sys
      service_name: db19c.domain
      collection_interval: 60s
  service:
    pipelines:
      oracledb:
        receivers:
          - oracledb

For Audit Logs, add the following in the same yaml config file:

logging:
  receivers:
    oracledb_audit:
      type: oracledb_audit
      include_paths: [/opt/oracle/admin/*/adump/*.aud] 
  service:
    pipelines:
    oracledb:
     receivers:
       - oracledb_audit

Restart the Ops Agent with the following command:

sudo service google-cloud-ops-agent restart

sleep 30

You can edit the config file for more precise control over your agent behavior, but it is not necessary. The Service ID (SID) and/or Service Name may need to be specified for your environment, as well as the Endpoint. The SSL config works through Oracle Wallet, rather than raw files like most other OpenTelemetry configs. You can find information about Oracle Wallets here.

Viewing the metrics collected

If you followed the steps detailed above, the following Oracle DB metrics will now be delivered to your preferred destination.

List of metrics collected:

MetricTypeLabels
workload.googleapis.com/oracle.backup.latestCUMULATIVE, INT64
gce_instance
database_id
db_system
global_name
workload.googleapis.com/oracle.buffer.cache.ratioGAUGE, DOUBLE
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.cursor.countCUMULATIVE, INT64
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.cursor.currentGAUGE, INT64
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.disk.operation.countCUMULATIVE, INT64
gce_instance
database_id
db_system
direction
global_name
instance_id
workload.googleapis.com/oracle.disk.operation.sizeCUMULATIVE, INT64
gce_instance
database_id
db_system
direction
global_name
instance_id
workload.googleapis.com/oracle.logon.countCUMULATIVE, INT64
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.logon.currentGAUGE, INT64
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.network.dataCUMULATIVE, INT64
gce_instance
database_id
db_system
direction
global_name
instance_id
target
workload.googleapis.com/oracle.process.countGAUGE, INT64
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.process.limitGAUGE, INT64
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.process.pga_memory.sizeGAUGE, INT64
gce_instance
database_id
db_system
global_name
instance_id
program
state
workload.googleapis.com/oracle.row.cache.ratioGAUGE, DOUBLE
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.service.response_timeGAUGE, DOUBLE
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.session.countGAUGE, INT64
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.session.limitGAUGE, INT64
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.sort.countCUMULATIVE, INT64
gce_instance
database_id
db_system
global_name
instance_id
type
workload.googleapis.com/oracle.sort.row.countCUMULATIVE, INT64
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.tablespace.countGAUGE, INT64
gce_instance
contents
database_id
db_system
global_name
status
workload.googleapis.com/oracle.tablespace.sizeGAUGE, INT64
gce_instance
contents
database_id
db_system
global_name
state
tablespace_name
workload.googleapis.com/oracle.user.callsCUMULATIVE, INT64
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.user.commitsCUMULATIVE, INT64
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.user.rollbacksCUMULATIVE, INT64
gce_instance
database_id
db_system
global_name
instance_id
workload.googleapis.com/oracle.wait.countCUMULATIVE, INT64
gce_instance
database_id
db_system
global_name
instance_id
type
wait_class
workload.googleapis.com/oracle.wait.timeCUMULATIVE, INT64
gce_instance
database_id
db_system
global_name
instance_id
type
wait_class
workload.googleapis.com/oracle.wait.timeoutsCUMULATIVE, INT64
gce_instance
database_id
db_system
global_name
instance_id
type
wait_class

observIQ’s monitoring technology is a game changer for organizations that care about performance and efficiency. If you’re using Oracle DB, our solutions can make a significant difference in your infrastructure monitoring. Follow this space to keep up with all our future posts and simplified configurations for various sources. For questions, requests, and suggestions, reach out to our support team at support@observIQ.com. Join our open source observability community Slack Channel.