JavaMonWeb
Publishes counters from Oracle using the LILOM Library as REST services. It builds a Java Servlet WAR container, with OraMonREST WebService. Each REST method is described below.
Launch with Java
The WAR file can be launched using a clean JRE and the provided Jetty-Runner files in the /jetty folder of the repository. Example launch .bat files are provided as well. Everything needed to run the Oracle Monitor except for a JRE is included in this folder, including a JavaScript sample file for use as a SiteScope Custom Monitor
Example for jre8:
java -jar jetty-runner-9.3.7.v20160115.jar JavaMonWeb.war
Note that Jetty-Runner 9.3 requires at least version 8 of the JRE. A Jetty-Runner 9.2 is provided as well that runs under JRE version 7.
GET /OraMonREST/getData
Creates a new connection to the Oracle instance if needed, and fetches the raw statistics if the data is older than the specified age or this is the first call (no data). If the age of the existing data is within the specified limit, no call will be performed towards the Oracle instance (cached data will be used). This prohibits uneccessary calls to Oracle if several clients monitor the same instance.
Query String:
Name | Value | Example |
---|---|---|
connectionString | host:port:sid:user:password or host:port/servicename:user:password where host can be a dns name or IP adress | 192.168.154.128:1521:XE:system:p@ssw0rd |
age | allowed age of data in seconds | 14 |
Response:
{
"error": false,
"msg": "Sucessfully collected data on instance 'XE'",
"ms": 45
}
GET /OraMonREST/getMetrics
Calculates a predefined set of metrics for the previously collected raw statistics from a getData call. If the instance does not exist or has no data, and error will be returned. Instances are identified using the connectionString without the username and password.
Many metrics in the raw Oracle statistics are cumulative values. In order to get per second values these counters, a delta has to be defined and the change within this delta can be used together with the time passed within the delta in order to calculate a per second value. This is done automatically by this service, were the delta is the amount of time passed between 2 getData calls. The metrics calculated will reflect the average use per second during this delta for each counter.
Query String:
Name | Value | Example |
---|---|---|
connectionString | host:port:sid or host:port/servicename where host can be a dns name or IP adress | 192.168.154.128:1521:XE |
Response:
{
"error": false,
"nvarray": [{
"name": "Cpus (#)",
"value": 2
}, {
"name": "Cpu Time (us/s)",
"value": 152.39450378806012
}, {
"name": "Cpu Usage (%)",
"value": 0.007619725189403006
}, {
"name": "OS Busy (%)",
"value": 1.5958589591722596
}, {
"name": "OS Load (#)",
"value": 0.0
}, {
"name": "OS Page In (KB/s)",
"value": 24.97245385841345
}, {
"name": "OS Page Out (KB/s)",
"value": 19.28234023957637
}, {
"name": "OS Load per Cpu (#)",
"value": 0.0
}, {
"name": "Logical Reads (#/s)",
"value": 10.241854818012516
}, {
"name": "Consistent Gets (#/s)",
"value": 8.43884286099723
}, {
"name": "DB Block Gets (#/s)",
"value": 1.803011957015287
}, {
"name": "Cache Hit Ratio (%)",
"value": 98.75751953674032
}, {
"name": "Buffer Cache Hit Ratio (%)",
"value": 99.27574262622022
}, {
"name": "DB Block Changes (#/s)",
"value": 0.9990227755805765
}, {
"name": "Redo Size (#/s)",
"value": 163.27149729206835
}, {
"name": "Physical Reads (#/s)",
"value": 0.1272530451892262
}, {
"name": "Physical Writes (#/s)",
"value": 0.06967248175518719
}, {
"name": "Redo Writes (#/s)",
"value": 0.03208059962753601
}, {
"name": "Non-idle Wait Time (ms/s)",
"value": 0.20268358328781727
}, {
"name": "File I/O Wait Time (ms/s)",
"value": 105.95555767598265
}, {
"name": "Executes (#/s)",
"value": 1.1720934976737452
}, {
"name": "User Calls (#/s)",
"value": 0.0524805706727384
}, {
"name": "User Commits (#/s)",
"value": 0.0038661235448569043
}, {
"name": "User Rollbacks (#/s)",
"value": 0.0
}, {
"name": "Parse Count Total (#/s)",
"value": 0.4627009561663848
}, {
"name": "Parse Count Hard (#/s)",
"value": 0.050012832239851014
}]
}