OraMon.jsp
2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<%@page import="se.lil.om.OraMon"%>
<%@page import="se.lil.jm.JmxMon"%>
<%@page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>OraMon Admin</title>
</head>
<body>
<%
// Handling of actions
boolean error = false;
String errMsg = "";
if(request.getParameter("action") != null) {
if(request.getParameter("action").equals("add")) {
if(request.getParameter("data") != null && request.getParameter("data").length() != 0) {
//se.lil.om.Registry.getList().add(new OraMon());
} else {
error = true;
errMsg = "Data is empty. Nothing added.";
}
}
}
%>
<% if(error) { %>
<div style="background: Salmon; padding: 10px;">Error: <%= errMsg %></div>
<% } %>
<h1>OraMon Web 1.1 with JmxMon</h1>
<h2>Status Oracle Monitors</h2>
<p>Number of monitors: <%= se.lil.om.Registry.getList().size() %></p>
<div style="background-color: LightSteelBlue; padding: 10px;">
<table>
<tr>
<th>Name</th>
<th>Connection String</th>
<th>Data Calls</th>
<th>Success</th>
<th>Failed</th>
<th>Last Exception</th>
<th>Age</th>
<th>RT</th>
</tr>
<% for (OraMon mon : se.lil.om.Registry.getList()) { %>
<tr>
<td><%= mon.getDBName() %></td>
<td><%= mon.getConString() %></td>
<td><%= mon.getDataCalled() %></td>
<td><%= mon.getDataSucceeded() %></td>
<td><%= mon.getDataFailed() %></td>
<td><%= mon.getLastEx() %></td>
<td><%= mon.getAgeTs() %>s</td>
<td><%= mon.getLastRTms() %>ms</td>
</tr>
<% } %>
</table>
</div>
<h2>Status JMX Monitors</h2>
<p>Number of monitors: <%= se.lil.jm.Registry.getList().size() %></p>
<div style="background-color: LightSteelBlue; padding: 10px;">
<table>
<tr>
<th>Name</th>
<th>Connection String</th>
<th>Data Calls</th>
<th>Success</th>
<th>Failed</th>
<th>Last Exception</th>
<th>Age</th>
<th>RT</th>
</tr>
<% for (JmxMon mon : se.lil.jm.Registry.getList()) { %>
<tr>
<td><%= mon.getServerName() %></td>
<td><%= mon.getConString() %></td>
<td><%= mon.getDataCalled() %></td>
<td><%= mon.getDataSucceeded() %></td>
<td><%= mon.getDataFailed() %></td>
<td><%= mon.getLastEx() %></td>
<td><%= mon.getAgeTs() %>s</td>
<td><%= mon.getLastRTms() %>ms</td>
</tr>
<% } %>
</table>
</div>
<!--
<h2>Administration</h2>
<div title="Add Monitor" style="background: WhiteSmoke; padding: 10px;">
<form>
<table>
<tr><td>Data:</td><td><input name="data" size="50"></td></tr>
</table>
<input type="submit" name="action" value="add">
</form>
</div>
-->
</body>
</html>