diff options
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs index b6a2025..11aca99 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs | |||
@@ -52,6 +52,36 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring | |||
52 | 52 | ||
53 | public Hashtable StatsPage(Hashtable request) | 53 | public Hashtable StatsPage(Hashtable request) |
54 | { | 54 | { |
55 | // If request was for a specific monitor | ||
56 | // eg url/?monitor=Monitor.Name | ||
57 | if (request.ContainsKey("monitor")) | ||
58 | { | ||
59 | string monID = (string) request["monitor"]; | ||
60 | |||
61 | foreach (IMonitor monitor in m_monitors) | ||
62 | { | ||
63 | if (monitor.ToString() == monID) | ||
64 | { | ||
65 | Hashtable ereply3 = new Hashtable(); | ||
66 | |||
67 | ereply3["int_response_code"] = 404; // 200 OK | ||
68 | ereply3["str_response_string"] = monitor.GetValue().ToString(); | ||
69 | ereply3["content_type"] = "text/plain"; | ||
70 | |||
71 | return ereply3; | ||
72 | } | ||
73 | } | ||
74 | |||
75 | // No monitor with that name | ||
76 | Hashtable ereply2 = new Hashtable(); | ||
77 | |||
78 | ereply2["int_response_code"] = 404; // 200 OK | ||
79 | ereply2["str_response_string"] = "No such monitor"; | ||
80 | ereply2["content_type"] = "text/plain"; | ||
81 | |||
82 | return ereply2; | ||
83 | } | ||
84 | |||
55 | string xml = "<data>"; | 85 | string xml = "<data>"; |
56 | foreach (IMonitor monitor in m_monitors) | 86 | foreach (IMonitor monitor in m_monitors) |
57 | { | 87 | { |