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
Download and install the Oracle Instant Client libraries.
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;
- 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 Metric | Metric Display Name | Unit | Description |
---|---|---|---|
oracle_buffer_cachehit_ratio | Buffer Cachehit Ratio | fraction | Ratio of buffer cache hits |
oracle_cursor_cachehit_ratio | Cursor Cachehit Ratio | fraction | Ratio of cursor cache hits |
oracle_library_cachehit_ratio | Library Cachehit Ratio | fraction | Ratio of library cache hits |
oracle_shared_pool_free | Shared Pool Free | percent | shared pool free memory % |
oracle_physical_reads | Physical Reads | Reads / second | Physical reads per second |
oracle_physical_writes | Physical Writes | Writes / second | Physical writes per second |
oracle_enqueue_timeouts | Enqueue Timeouts | Timeouts / second | Enqueue timeouts per second |
oracle_gc_cr_block_received | Gc Cr Block Received | Blocks / second | GC CR block received |
oracle_cache_blocks_corrupt | Cache Blocks Corrupt | Blocks | Corrupt cache blocks |
oracle_cache_blocks_lost | Cache Blocks Lost | Blocks | Lost cache blocks |
oracle_logons | Logons | Number of logon attempts | |
oracle_active_sessions | Active Sessions | Number of active sessions | |
oracle_long_table_scans | Long Table Scans | Scans / second | Number of long table scans per second |
oracle_service_response_time | Service Response Time | seconds | Service response time |
oracle_user_rollbacks | User Rollbacks | operations | Number of user rollbacks |
oracle_sorts_per_user_call | Sorts Per User Call | Sorts per user call | |
oracle_rows_per_sort | Rows Per Sort | Rows / Operation | Rows per sort |
oracle_disk_sorts | Disk Sorts | operations / second | Disk sorts per second |
oracle_memory_sorts_ratio | Memory Sorts Ratio | fraction | Memory sorts ratio |
oracle_database_wait_time_ratio | Database Wait Time Ratio | fraction | Database wait time ratio |
oracle_session_limit_usage | Session Limit Usage | percent | Session limit usage |
oracle_session_count | Session Count | Session count | |
oracle_process_pga_used_memory | Process Pga Used Memory | bytes | PGA memory used by process |
oracle_process_pga_allocated_memory | Process Pga Allocated Memory | bytes | PGA memory allocated by process |
oracle_process_pga_freeable_memory | Process Pga Freeable Memory | bytes | PGA memory freeable by process |
oracle_process_pga_maximum_memory | Process Pga Maximum Memory | bytes | PGA maximum memory ever allocated by process |
oracle_temp_space_used | Temp Space Used | bytes | Temp space used |
oracle_tablespace_used | Tablespace Used | bytes | Tablespace used |
oracle_tablespace_size | Tablespace Size | bytes | Tablespace size |
oracle_tablespace_in_use | Tablespace In Use | fraction | Tablespace in-use |
oracle_tablespace_offline | Tablespace Offline | Tablespace offline | |
oracle_blocking_lock_queries | Blocking Lock Queries | Number of blocking locks | |
oracle_cache_invalidations | Cache Invalidations | Number of Cache invalidations on particular database | |
oracle_data_filelesize_allocated | Data Filelesize Allocated | megabytes | Data File Size Allocated for the database. |
oracle_library_cache_reloads | Library Cache Reloads | Number of Library Cache Reloads by database. | |
oracle_users_commit | Users Commit | Number of User commits | |
oracle_long_running_queries | Long Running Queries | Number of Long Running Queries | |
oracle_tablescan_blocks | Tablescan Blocks | Number of Table scan blocks by database | |
oracle_processes | Processes | percent | Caluclates the percentage of processes running with respect to the total number of process |