Oracle Database Monitoring

Analyze your database performance, usage, and availability at scale to enhance resource efficiency and optimize end-user experience problems.

Start 30-day free trial Try now, sign up in 30 seconds

Oracle is an object-relational database management system primarily designed for enterprise grid computing. It manages information, applications and provides logical data storage using tablespaces.

Monitoring its performance is essential to oversee database health and quickly identify and fix problematic servers and resource areas.

  • Know the memory and disk space metrics to make sure your Oracle DB processes have enough resources available.
  • Monitor response time and find out if there's any service suffering from bad database response times.
  • Know if the tablespaces are full and whether they require appropriate action to increase their capacity.
  • Track the number of Oracle sessions to know how busy a server is and ensure their continued functioning.

This document details the monitoring metrics to ensure continued performance and the steps to install the plugin .

Performance Monitoring Metrics

To monitor your entire Oracle database (

Buffer Cache Hit Ratio

It is the rate at which Oracle finds the data blocks it needs in memory over the lifetime of an instance. buffer_cache_hit_ratio is critical for databases with an undersized buffer pool.

Disk and Memory Sort Ratio

Use the metric disk_memory_sort_ratio to know the percentage of times a session had to perform a disk or a memory sort. Excessive sort activity can degrade the overall database performance.

Oracle Status

oracle_status helps to notify whether the database is running or not. This helps to monitor business critical metrics, generate alarms and also execute actions automatically when your database goes down.

Response Time

response_time (ms) is the time spent in database operations per transaction. This helps to understand the database’s capacity to process any change in the workload because of resource shortage or contention.

Process Usage Percentage

Use the metric processes_usage to study the maximum number of Operating System (OS) user processes that can simultaneously connect to the Oracle database at the same time. This includes the background processes as well.

Sessions Usage

The sessions_usage in percentage specifies the maximum number of sessions used by the database. As every login creates a session, this metric helps to determine the maximum concurrent users in the system.

Failed Jobs

Use the metric failed_jobs to know the number of jobs failed, either by throwing an error or by abnormally terminating.

Active and Inactive Sessions

The metrics active_sessions and inactive_sessions denotes the number of active and inactive sessions respectively.

Failed Login Count

Use the metric failed_login_count to know the number of failed logon attempts.

Invalid Objects Count

The invalid_objects_count metric shows the invalid objects by owner, which will help reduce subsequent latencies.

PGA Cache Hit Percentage

The metric pga_cache_hit_percentage gives the cache hits of Program Global Area (PGA) in percentage used by the process.

RMAN Failed Backup Count

The rman_failed_backup_count provides the number of failed backups in the RMAN repository.

SQL Response Time

The sql_response_time monitors the response time of the SQL service.

To monitor your tablespaces

Note: If you wish to monitor only the status and usage of a tablespace, use the plugin.

Tablespace Status and its Usage (in %)

Know your tablespace_status to be either Read Write, Read Only or Offline. tablespace_usage_percent helps to track how data grows in the database and to make sure appropriate provisioning is given at the right time.

Number of Reads & Writes in a Tablespace

The reads and writes represents the number of physical reads and writes respectively. A total of the reads and writes gives the I/O activity for a specific disk.

Free Blocks

The free_blocks metric gives the number of blocks on Oracle’s freelist groups for a table, index, or cluster segment

Used and Free Space (in MB)

The metrics used_space and free_space describes used and free sequential data blocks in a tablespace.


LOGGING/NOLOGGING helps to control direct path writes to reduce generation of REDO and UNDO. It is one of the varied methods to control the balance between recoverability and performance.


  • oracle-instantclient-basic-linux
  • oracle-instantclient-sdk-linux
  • cx_Oracle - Python Interface for Oracle Database
  1. Install the following packages: apt-get install python-dev build-essential libaio1
  2. Download instant client for Linux x86-64 from the Oracle website
  3. Unzip and extract the downloaded zip files into a folder. For example, mkdir -p /opt/oracle_client
  4. Add environment variables:
    • Create a file in /etc/profile.d/ and add the following lines:
      export ORACLE_HOME=/opt/oracle_client/instantclient_12_2
  5. Create a file in /etc/ and add the following lines /opt/oracle_client/instantclient_12_2
  6. Execute the command sudo ldconfig
    Note: Ensure you log out of your server and relogin for the changes to be reflected.
  7. Create a symlink
    ln -s
  8. Install cx_Oracle python using pip
  9. pip install cx_Oracle
Note: If you are using Centos/RHEL OS, follow the steps given in this article to install the above modules.

Plugin Installation

  • Download and install the latest version of the Site24x7 Linux agent in the server where you plan to run the plugin. If it is installed successfully, you will see a Linux server monitor in the Site24x7 Control Panel. This confirms that the agent is able to communicate with our data center.
  • Download the following plugins from our GitHub repository based on your requirement:
  • Provide appropriate Oracle configurations in the respective .cfg files for each plugin.

    Ensure the following roles are provided to the user mentioned in the above configurations:

    • In addition to the above, for the Oracle Tablespace Usage and the Oracle Tablespace Details plugins, grant SELECT permission for the following tables: sys.dba_tablespaces, sys.dba_free_space, sys.dba_data_f, dba_extents
  • Create distinct folders based on the plugins you have downloaded, under the Site24x7 Linux agent plugin directory '/opt/site24x7/monagent/plugins/' and place the respective plugin files (.py and .cfg) under '/opt/site24x7/monagent/plugins//'. Note that the plugin file name and the folder name should be identical.
    • For example, place the and OracleCore.cfg files in the OracleCore folder.
    • Place the and the OracleWaits.cfg files in the OracleWaits folder and so on.

The agent will automatically execute the plugin within five minutes and send performance data to the Site24x7 data center.

View Data in the Site24x7 Web Client

  1. Log in to Site24x7 and go to Server> Plugins > Name of Plugin Monitor.
  2. You will be able to view the performance charts on the various metrics for your Oracle server.

Error Handling

S.No Error Message Solution
1 cx_Oracle module is not installed Check in the Prerequisites section and install the Python module
2 Exception while connecting to host Make sure you have entered valid configuration details (Hostname, Port, SID, Username, Password)
3 Please check the Tablespace Name in the configuration section Ensure the Tablespace name given in the Configuration Section of the plugin script is valid

Plugin Contribution

Feel free to contribute to our existing plugin and come up with suggestions or feedback on our Community.

Other Plugin Integrations

  • Out-of-the-box plugins - Monitor your entire app stack with our extensive list of integrations
  • NGINX and NGINX Plus - Stay ahead of issues occuring within NGINX as well as anywhere else in your web infrastructure
  • MySQL - Monitor performance metrics of your MySQL databases
  • Postgres - Proactively monitor the availability and performance of business-crtical Postgres database server
  • Nagios - Execute thousands of Nagios plugins in Site24x7 without the need of running a Nagios server
  • Custom Script Monitoring - Create custom Linux and Windows plugins and monitor attributes that you need
  • GitHub Repository - Check out our 50+ plugin integrations