Version 1.3 with a new method in JavaMonWeb for OraMon getPrometheus()
Showing
5 changed files
with
15 additions
and
1 deletions
| ... | @@ -78,6 +78,18 @@ function getMetrics(type, input, pdb) { | ... | @@ -78,6 +78,18 @@ function getMetrics(type, input, pdb) { |
| 78 | client2.send(); | 78 | client2.send(); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | function getPrometheus(type, input, pdb) { | ||
| 82 | // Get the metrics | ||
| 83 | var pdbAdd = ""; | ||
| 84 | if(pdb != "" && pdb != null) pdbAdd = "pdbName=" + pdb + "&"; | ||
| 85 | var client2 = new XMLHttpRequest(); | ||
| 86 | client2.onreadystatechange = metricsHandler; | ||
| 87 | client2.open("GET", "" + type + "/getPrometheus?" + pdbAdd + "connectionString=" + encodeURIComponent(input)); | ||
| 88 | client2.setRequestHeader('Cache-Control', 'no-cache'); | ||
| 89 | client2.setRequestHeader('Pragma', 'no-cache'); | ||
| 90 | client2.send(); | ||
| 91 | } | ||
| 92 | |||
| 81 | function showGraph(type, input, pdb) { | 93 | function showGraph(type, input, pdb) { |
| 82 | // Get the metrics | 94 | // Get the metrics |
| 83 | var pdbAdd = ""; | 95 | var pdbAdd = ""; |
| ... | @@ -98,7 +110,7 @@ function dataHandler() { | ... | @@ -98,7 +110,7 @@ function dataHandler() { |
| 98 | } | 110 | } |
| 99 | </script> | 111 | </script> |
| 100 | 112 | ||
| 101 | <h1>OraMon Web 1.2</h1> | 113 | <h1>OraMon Web 1.3</h1> |
| 102 | 114 | ||
| 103 | <h2>Status Oracle Monitors</h2> | 115 | <h2>Status Oracle Monitors</h2> |
| 104 | <p>Number of monitors: <%= se.lil.om.Registry.getList().size() %></p> | 116 | <p>Number of monitors: <%= se.lil.om.Registry.getList().size() %></p> |
| ... | @@ -151,6 +163,7 @@ function dataHandler() { | ... | @@ -151,6 +163,7 @@ function dataHandler() { |
| 151 | <input type="button" value="graph" onClick="showGraph('viewOraMon','<%= URLEncoder.encode(mon.getConString(), "UTF-8") %>',this.form.pdbName.value)"> | 163 | <input type="button" value="graph" onClick="showGraph('viewOraMon','<%= URLEncoder.encode(mon.getConString(), "UTF-8") %>',this.form.pdbName.value)"> |
| 152 | <input id="getDataButton" type="button" value="getData" onClick="getData('OraMonREST', '<%= mon.getConString() %>',this.form.pdbName.value)"> | 164 | <input id="getDataButton" type="button" value="getData" onClick="getData('OraMonREST', '<%= mon.getConString() %>',this.form.pdbName.value)"> |
| 153 | <input id="getMetricsButton" type="button" value="getMetrics" onClick="getMetrics('OraMonREST', '<%= mon.getConString() %>',this.form.pdbName.value)"> | 165 | <input id="getMetricsButton" type="button" value="getMetrics" onClick="getMetrics('OraMonREST', '<%= mon.getConString() %>',this.form.pdbName.value)"> |
| 166 | <input id="getPrometheusButton" type="button" value="getPrometheus" onClick="getPrometheus('OraMonREST', '<%= mon.getConString() %>',this.form.pdbName.value)"> | ||
| 154 | <input id="pdbName" name="pdbName" size="10"> | 167 | <input id="pdbName" name="pdbName" size="10"> |
| 155 | </form> | 168 | </form> |
| 156 | </td> | 169 | </td> | ... | ... |
This file is too large to display.
No preview for this file type
JavaMonWeb/src/OraMonRESTgetPrometheus.java
0 → 100644
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment