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.
##Installation
- 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;
- Download an extract the OracleDbMonitor.zip into your
<machine-agent-home>/monitors directory
. - If you're monitoring multiple Oracle DB instances, in
<machine-agent-home>/monitors
, create a subdirectory for every Oracle instance (SID) that you want to monitor. E.g.:
mkdir OraDbMonitor_ORCL
and copy "OracleDbMonitor.jar" and "monitor.xml" into the new subdirectory. 4. Get a suitable Oracle JDBC driver and copy or link it to the new subdirectory:
JRE VERSION | Driver | Location |
Java 1.5 | ojdbc5_g.jar | http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html OR $ORACLE_HOME/jdbc/lib/ojdbc5_g.jar |
Java 6 | ojdbc6_g.jar | http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html OR $ORACLE_HOME/jdbc/lib/ojdbc6_g.jar |
Note: You may copy the driver file into your monitor subdirectory or use a symbolic link, like:
ln \--s $ORACLE_HOME/jdbc/lib/ojdbc5_g.jar ojdbc5_g.jar
- Restart the Machine Agent.
- Look for the metrics in the
AppDynamics Metric Browser under | Application Infrastructure Performance | <Tier> | Custom Metrics | Oracle Instance (SID)
.
##Metrics
Here is a summary of the collected metrics. Complete documentation of Oracle's metrics can be found at http://docs.oracle.com/cd/E11882_01/server.112/e17110/waitevents.htm#REFRN101.
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 | Description | |||||||||||||||||||||||||||||||||||||
Activity |
|
|||||||||||||||||||||||||||||||||||||
Wait Class Breakdown | Shows 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: [http://docs.oracle.com/cd/E11882\_01/server.112/e17110/waitevents001.htm\#BGGHJGII](http://docs.oracle.com/cd/E11882_01/server.112/e17110/waitevents001.htm#BGGHJGII) | |||||||||||||||||||||||||||||||||||||
Efficiency |
|
|||||||||||||||||||||||||||||||||||||
Resource Utilization |
|
##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 author's knowledge, not subject to additional licensing of the Oracle Diagnostics Pack. See Oracle's "Options and Packs" documentation: http://docs.oracle.com/cd/E11882_01/license.112/e10594/options.htm#CIHIHDDJ
If you plan on extending this code using data dictionary views of the Diagnostics Pack (e.g., DBA_HIST_% views), you might want to make use of the argument "ash_licensed" in monitor.xml to easily en-/disable usage of such code.
##Contributing
Always feel free to fork and contribute any changes directly via GitHub.
##Community
Find out more in the AppSphere community.
##Support
For any questions or feature request, please contact AppDynamics Center of Excellence.