Oracle Database is a multi-model database management system produced and marketed by Oracle Corporation.

It is a database commonly used for running online transaction processing (OLTP), data warehousing (DW) and mixed (OLTP & DW) database workloads.

Prerequisites

  1. Download and install the Oracle Instant Client libraries.

  2. Create a read-only user with access to your Oracle Database server. To create a user, connect to your Oracle database as an administrative (for example, SYSDBA or SYSOPER) and run the following:

==Enable Oracle Script==
ALTER SESSION SET "_ORACLE_SCRIPT"=true;
 
==Create the user==
CREATE USER '<Username>' IDENTIFIED BY '<PASSWORD>';
 
==Grant access to the '<Username>' user==
GRANT CONNECT TO '<Username>';
GRANT SELECT ON GV_$PROCESS TO '<Username>';
GRANT SELECT ON gv_$sysmetric TO '<Username>';
GRANT SELECT ON sys.dba_data_files TO '<Username>';
GRANT SELECT ON sys.dba_tablespaces TO '<Username>';
GRANT SELECT ON sys.dba_tablespace_usage_metrics TO '<Username>';

Note: For Oracle version 11g, do not run the line -ALTER SESSION SET "_ORACLE_SCRIPT"=true; 3. For Oracle version 12c and 19c, log into the root database as an Administrator to create a user and grant permissions:

alter session set container = cdb$root;
CREATE USER '<Username>' IDENTIFIED BY '<Password>' CONTAINER=ALL;
GRANT CREATE SESSION TO '<Username>' CONTAINER=ALL;
Grant select any dictionary to '<Username>' container=all;
GRANT SELECT ON GV_$PROCESS TO '<Username>' CONTAINER=ALL;
GRANT SELECT ON gv_$sysmetric TO '<Username>' CONTAINER=ALL;
  1. For Virtual Machines, install the Linux Agent.

Configuring the credentials

Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml

oracle:
- name: oracle
  user: <username>
  pwd: <Password>
  encoding-type: plain
  labels:
    key1: val1
    key2: val2

Configuring the application

Virtual machine

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-detection.yaml

- name: oracle
  instance-checks:
    service-check:
      - oracle
    process-check:
      - oracle
    port-check:
      - 1521

Validate

Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.

Metrics

OpsRamp MetricMetric Display NameUnitDescription
oracle_buffer_cachehit_ratioBuffer Cachehit RatiofractionRatio of buffer cache hits
oracle_cursor_cachehit_ratioCursor Cachehit RatiofractionRatio of cursor cache hits
oracle_library_cachehit_ratioLibrary Cachehit RatiofractionRatio of library cache hits
oracle_shared_pool_freeShared Pool Freepercentshared pool free memory %
oracle_physical_readsPhysical ReadsReads / secondPhysical reads per second
oracle_physical_writesPhysical WritesWrites / secondPhysical writes per second
oracle_enqueue_timeoutsEnqueue TimeoutsTimeouts / secondEnqueue timeouts per second
oracle_gc_cr_block_receivedGc Cr Block ReceivedBlocks / secondGC CR block received
oracle_cache_blocks_corruptCache Blocks CorruptBlocksCorrupt cache blocks
oracle_cache_blocks_lostCache Blocks LostBlocksLost cache blocks
oracle_logonsLogonsNumber of logon attempts
oracle_active_sessionsActive SessionsNumber of active sessions
oracle_long_table_scansLong Table ScansScans / secondNumber of long table scans per second
oracle_service_response_timeService Response TimesecondsService response time
oracle_user_rollbacksUser RollbacksoperationsNumber of user rollbacks
oracle_sorts_per_user_callSorts Per User CallSorts per user call
oracle_rows_per_sortRows Per SortRows / OperationRows per sort
oracle_disk_sortsDisk Sortsoperations / secondDisk sorts per second
oracle_memory_sorts_ratioMemory Sorts RatiofractionMemory sorts ratio
oracle_database_wait_time_ratioDatabase Wait Time RatiofractionDatabase wait time ratio
oracle_session_limit_usageSession Limit UsagepercentSession limit usage
oracle_session_countSession CountSession count
oracle_process_pga_used_memoryProcess Pga Used MemorybytesPGA memory used by process
oracle_process_pga_allocated_memoryProcess Pga Allocated MemorybytesPGA memory allocated by process
oracle_process_pga_freeable_memoryProcess Pga Freeable MemorybytesPGA memory freeable by process
oracle_process_pga_maximum_memoryProcess Pga Maximum MemorybytesPGA maximum memory ever allocated by process
oracle_temp_space_usedTemp Space UsedbytesTemp space used
oracle_tablespace_usedTablespace UsedbytesTablespace used
oracle_tablespace_sizeTablespace SizebytesTablespace size
oracle_tablespace_in_useTablespace In UsefractionTablespace in-use
oracle_tablespace_offlineTablespace OfflineTablespace offline
oracle_blocking_lock_queriesBlocking Lock QueriesNumber of blocking locks
oracle_cache_invalidationsCache InvalidationsNumber of Cache invalidations on particular database
oracle_data_filelesize_allocatedData Filelesize AllocatedmegabytesData File Size Allocated for the database.
oracle_library_cache_reloadsLibrary Cache ReloadsNumber of Library Cache Reloads by database.
oracle_users_commitUsers CommitNumber of User commits
oracle_long_running_queriesLong Running QueriesNumber of Long Running Queries
oracle_tablescan_blocksTablescan BlocksNumber of Table scan blocks by database
oracle_processesProcessespercentCaluclates the percentage of processes running with respect to the total number of process