Technical “How-To’s”

How to monitor Oracle DB with Google Cloud Platform

Paul Stefanski
Paul Stefanski
Share:

Monitor Oracle DB in the Google Cloud Platform with the Google Ops Agent. The Ops Agent is available on GitHub, making 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 often used for large deployments, so managing resources can take time and effort. Oracle Enterprise Manager is Oracle’s solution for monitoring Oracle DB. However, if you want to scan multiple environments with the same tool or avoid the cost of Oracle Enterprise Manager, then using the ops agent with Google Cloud Platform is ideal. The ops agent leverages the sqlquery receiver from OpenTelemetry with queries 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 appropriately configured 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.

The Oracle DB receiver can gather all the above categories – 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:

yaml
1metrics:
2  receivers:
3    oracledb:
4      type: oracledb
5      endpoint: myhost.domain:1111
6      wallet: /my/oracle/wallet/path here/
7      insecure: false
8      insecure_skip_verify: false
9      password: p@ssword
10      username: sys
11      service_name: db19c.domain
12      collection_interval: 60s
13  service:
14    pipelines:
15      oracledb:
16        receivers:
17          - oracledb

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

yaml
1logging:
2  receivers:
3    oracledb_audit:
4      type: oracledb_audit
5      include_paths: [/opt/oracle/admin/*/adump/*.aud] 
6  service:
7    pipelines:
8    oracledb:
9     receivers:
10       - 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 unnecessary. The Service ID (SID) and/or Service Name may need to be specified for your environment and the Endpoint. The SSL configuration works through Oracle Wallet rather than raw files, like most other OpenTelemetry configurations. You can find information about Oracle Wallets here.

Viewing the metrics collected

If you follow 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_instancedatabase_id db_system global_name
workload.googleapis.com/oracle.buffer.cache.ratioGAUGE, DOUBLE gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.cursor.countCUMULATIVE, INT64 gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.cursor.currentGAUGE, INT64 gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.disk.operation.countCUMULATIVE, INT64 gce_instancedatabase_id db_system direction global_name instance_id
workload.googleapis.com/oracle.disk.operation.sizeCUMULATIVE, INT64 gce_instancedatabase_id db_system direction global_name instance_id
workload.googleapis.com/oracle.logon.countCUMULATIVE, INT64 gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.logon.currentGAUGE, INT64 gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.network.dataCUMULATIVE, INT64 gce_instancedatabase_id db_system direction global_name instance_id target
workload.googleapis.com/oracle.process.countGAUGE, INT64 gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.process.limitGAUGE, INT64 gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.process.pga_memory.sizeGAUGE, INT64 gce_instancedatabase_id db_system global_name instance_id program state
workload.googleapis.com/oracle.row.cache.ratioGAUGE, DOUBLE gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.service.response_timeGAUGE, DOUBLE gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.session.countGAUGE, INT64 gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.session.limitGAUGE, INT64 gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.sort.countCUMULATIVE, INT64 gce_instancedatabase_id db_system global_name instance_id type
workload.googleapis.com/oracle.sort.row.countCUMULATIVE, INT64 gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.tablespace.countGAUGE, INT64 gce_instancecontents database_id db_system global_name status
workload.googleapis.com/oracle.tablespace.sizeGAUGE, INT64 gce_instancecontents database_id db_system global_name state tablespace_name
workload.googleapis.com/oracle.user.callsCUMULATIVE, INT64 gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.user.commitsCUMULATIVE, INT64 gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.user.rollbacksCUMULATIVE, INT64 gce_instancedatabase_id db_system global_name instance_id
workload.googleapis.com/oracle.wait.countCUMULATIVE, INT64 gce_instancedatabase_id db_system global_name instance_id type wait_class
workload.googleapis.com/oracle.wait.timeCUMULATIVE, INT64 gce_instancedatabase_id db_system global_name instance_id type wait_class
workload.googleapis.com/oracle.wait.timeoutsCUMULATIVE, INT64 gce_instancedatabase_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 significantly impact 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, contact our support team at support@observIQ.com. Join our open-source observability community Slack Channel.

Paul Stefanski
Paul Stefanski
Share:

Related posts

All posts

Get our latest content
in your inbox every week

By subscribing to our Newsletter, you agreed to our Privacy Notice

Community Engagement

Join the Community

Become a part of our thriving community, where you can connect with like-minded individuals, collaborate on projects, and grow together.

Ready to Get Started

Deploy in under 20 minutes with our one line installation script and start configuring your pipelines.

Try it now