Commit 46f52baa 46f52baa25b0b58c1e2fc059be3ac50e8960f279 by Christian Gerdes

Version 1.3 with a new method in JavaMonWeb for OraMon getPrometheus()

1 parent a4be1d68
...@@ -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>
......
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
2 /JmxMonRESTgetMetrics.class 2 /JmxMonRESTgetMetrics.class
3 /OraMonRESTgetData.class 3 /OraMonRESTgetData.class
4 /OraMonRESTgetMetrics.class 4 /OraMonRESTgetMetrics.class
5 /OraMonRESTgetPrometheus.class
......
This file is too large to display.