Oracle DB health
- Last Updated 3/31/2023, 12:34:01 PM UTC
- About 3 min read
Plugin info
name: ora-db-health
Collects health information for instance, root database and PDBs:
- instance status, enum of UNAVAILABLE, STARTED, MOUNTED, OPEN , OPEN MIGRATE
- root database open mode, enum of MOUNTED, READ WRITE, READ ONLY, READ ONLY WITH APPLY
- dimensions:
- database role, enum of SNAPSHOT STANDBY, LOGICAL STANDBY, PHYSICAL STANDBY, PRIMARY, FAR SYNC
- dimensions:
- root database restricted access, true/false
- dimensions:
- database role, enum of SNAPSHOT STANDBY, LOGICAL STANDBY, PHYSICAL STANDBY, PRIMARY, FAR SYNC
- dimensions:
- for each PDB excluding
PDB$SEED:- open mode, enum of MOUNTED, READ WRITE, READ ONLY, READ ONLY WITH APPLY
- dimensions:
- database role, enum of SNAPSHOT STANDBY, LOGICAL STANDBY, PHYSICAL STANDBY, PRIMARY, FAR SYNC
- dimensions:
- restricted access, true/false
- dimensions:
- database role, enum of SNAPSHOT STANDBY, LOGICAL STANDBY, PHYSICAL STANDBY, PRIMARY, FAR SYNC
- dimensions:
- open mode, enum of MOUNTED, READ WRITE, READ ONLY, READ ONLY WITH APPLY
# UNAVAILABLE status
An instance is reported as unavailable when not able to connect over BEQ with one of the following errors:
ORA-01033, ORACLE initialization or shutdown in progressORA-01034, ORACLE not availableORA-01088, shutdown in progress - operation not permitted until restartORA-01089, immediate shutdown or close in progress - no operations are permittedORA-01090, shutdown in progress - connection is not permittedORA-01092, ORACLE instance terminated. Disconnection forcedORA-27101, shared memory realm does not exist
All other errors are reported as plugin run errors.
# Metric source FQDNs
- Instance, configuration
sourceparam if present orsid - Root database, configuration
sourceparam if present orsid - PDB,
<pdb name>.<instance source fqdn>
# Prerequisites
- Linux
- User Groups:
oinstall,dba
- User Groups:
- Windows
- Group Memberships:
ORA_HOMENAME_DBA
- Group Memberships:
Important, the connection to the database/ASM takes place over BEQ. This means that the process resource limits for
myrmex-admust match those set for the oracle database/ASM processes. Set these limits in thesystemdunit file formyrmex-adand then reload and restart themyrmex-adservice. Refer to https://www.man7.org/linux/man-pages/man5/systemd.exec.5.html#PROCESS_PROPERTIES (opens new window) for the process limit directives and theirulimitequivalents.
# Metrics
oracle/db/instance/statusoracle/db/database/[role:database role]/open_modeoracle/db/database/[role:database role]/restricted
# Configuration
Plugin is configured with a yaml file:
oracle_home: path toORACLE_HOMEsource: the value that will appear as the source of metrics generated by this configuration. defaults to plugin hostnametimeout: execution timeout in duration format (opens new window). Defaults to10ssid: database SIDconnect_as: (optional) one ofsysdba,sysoper,sysasm. Default issysdba
# Example Configuration
oracle_home: /u01/app/oracle/product/12.2.0.1/dbhome_1
sid: my_sid
source: my_sid.db.prod
# Validate Configuration
ora-db-health --run-conf /path/to/config/file.yaml --validate
# Testing
Run the plugin from the command line and get any emitted metrics on stdout
ora-db-health --run-conf /path/to/config/file.yaml
# List metrics emitted by this plugin
ora-db-health --metrics