Oracle Database - Monitoring Extension


AppDynamics Oracle Database - Monitoring Extension


This extension works only with the standalone machine agent.


Use Case


The Oracle Database is an object-relational database management system.


The Oracle Database monitoring extension captures performance metrics from Oracle databases (version 10g and above) and displays them in AppDynamics. It retrieves metrics from the data dictionary and groups them in three categories:


  • Activity: Throughput over the last minute, such as transactions, SQL executes, I/O reads and writes, average active sessions, etc.
  • Resource Utilization: What database resources are currently in use (sessions, open cursors, shared pool, etc).
  • Efficiency: Ratios and response times as indicators of the instance's efficiency.




1. The Oracle DB extension needs an Oracle user account on every Oracle instance that is to be monitored. You might use an existing account with appropriate rights; however, a dedicated account will be a better solution in terms of security and manageability.

  • Example script for account creation (run this with a DBA user):
            CREATE USER appdynamics IDENTIFIED BY oracle;
            GRANT CREATE SESSION TO appdynamics;
            GRANT SELECT ANY DICTIONARY TO appdynamics;

2. Download and extract the into your <machine-agent-home>/monitors directory.


3. Configure the extension by editing the config.yml (See Configuration section below).


4. Restart the Machine Agent.


5. Look for the metrics in theAppDynamics Metric Browser under | Application Infrastructure Performance | <Tier> | Custom Metrics | Oracle Instance (SID).



Note : Please make sure to not use tab (\t) while editing yaml files. You may want to validate the yaml file using a yaml validator

  1. Configure the Oracle DB parameters by editing the config.yml file in <MACHINE_AGENT_HOME>/monitors/OracleDBMonitor/. Specify the host, port, username, password and sid of the Oracle DB instance.

    For eg.

        # Oracle DB connection params
        host: "localhost"
        port: 49161
        sid: "xe"
        username: "system"
        password: "oracle"
        # prefix used to show up metrics in AppDynamics
        metricPathPrefix:  "Custom Metrics|ORACLE Server|"
  2. Configure the path to the config.yml file by editing the in the monitor.xml file in the <MACHINE_AGENT_HOME>/monitors/OracleDBMonitor/ directory. Below is the sample

         <!-- config file-->
         <argument name="config-file" is-required="true" default-value="monitors/OracleDBMonitor/config.yml" />
  3. Download the oracle JDBC jar file and place it in the/monitors/OracleDBMonitor directory. Edit the monitor.xml and provide the name of the jar file in the classpath. For eg.





Here is a summary of the collected metrics. Complete documentation of Oracle's metrics can be found at

AppDynamics displays metric values as integers. Some metrics are therefore scaled up by a factor of 100 for a better display of low values (e.g. between 0 and 2).



Metric class: Activity


Active Sessions CurrentNumber of active sessions at the point in time when the snapshot was taken.
Average Active SessionsAverage number of active sessions within the last 60 s. This is maybe the single most important DB load metric and a good starting point for a drill-down.
Average Active Sessions per logical CPU (\*100)This shows the average load the database imposes on each logical CPU (i.e. cores or hyperthreads). Values above 100 (more than 1 waiting DB session per CPU) indicate a higher demand for resources than the host can satisfy. This often marks the beginning of quickly rising response times.
Current OS LoadHost CPU load, when available.
DB Block Changes Per SecDatabase blocks changed in the buffer cache.
DB Block Changes Per TxnDatabase blocks changed in the buffer cache per SQL transaction.
DB Block Gets Per SecDatabase blocks read from the buffer cache.
DB Block Gets Per TxnDatabase blocks read from the buffer cache per SQL transaction.
Executions Per SecSQL executions/s
Executions Per TxnSQL executions per SQL transaction.
I/O Megabytes per Second 
Logical Reads Per SecLogical reads are comprised of database block reads from the buffer cache + physical reads from disk.
Logons Per Sec 
Physical Reads Per SecDatabase blocks read from disk.
Physical Read Total Bytes Per Sec 
Physical Write Total Bytes Per Sec 
Txns Per SecTransactions per second. 
Wait Class BreakdownShows average active sessions per each wait class. Typically, the top wait classes are "CPU" and "User I/O". A shift to other wait classes is a good pointer for further nvestigation (e.g., of network latency issues). Wait classes are documented in the Oracle Database Reference. See here:



Metric Class: Efficiency


Database CPU Time RatioPercentage of CPU time against all database time.
Database Wait Time RatioComplementary to "Database CPU Time Ratio" (percentage of non-CPU waits).
Memory Sorts RatioPercentage of sort operations that were done in RAM (as opposed to disk).
Execute Without Parse RatioPercentage of (soft and hard) parsed SQL against all executed SQL.
Soft Parse RatioRatio of soft parses to hard parses.
Response Time Per Txn (ms) 
SQL Service Response Time (ms) 



Metric Class: Resource Utilization


# of logical CPUsObservation for informational purpose. This count is used, among others, for the metric "Average Active Sessions per logical CPU".
Total SessionsCount of all database sessions at the time the snapshot was taken.
% of max sessionsOpen sessions vs. DB parameter "sessions".
% of max open cursorsMaximum count of open cursors in a session vs. DB parameter "open\_cursors".
Shared Pool Free % 
Temp Space Used (MB)Amount of used temporary tablespace.
Total PGA Allocated (MB)Amount of RAM used for sorts, hashes and the like.


Oracle Licensing


The metrics in the supplied code are retrieved from:


-   v$session
-   v$sesstat
-   v$sysmetric
-   v$system_wait_class
-   v$waitclassmetric


all of which are, to the best of our knowledge, not subject to additional licensing of the Oracle Diagnostics Pack. See Oracle's "Options and Packs" documentation:





Always feel free to fork and contribute any changes directly via GitHub.




Find out more in the AppSphere community.




For any questions or feature request, please contact AppDynamics Center of Excellence.






Last Update: