diff options
author | Adam Frisby | 2009-11-12 11:17:04 +1100 |
---|---|---|
committer | Adam Frisby | 2009-11-12 11:17:04 +1100 |
commit | cedd827f7f0174ef152a6e2216a706070792301e (patch) | |
tree | 2d9ffb18685fd35f0c857b419fc93736fe592a31 /OpenSim | |
parent | clean up some cruft (diff) | |
download | opensim-SC-cedd827f7f0174ef152a6e2216a706070792301e.zip opensim-SC-cedd827f7f0174ef152a6e2216a706070792301e.tar.gz opensim-SC-cedd827f7f0174ef152a6e2216a706070792301e.tar.bz2 opensim-SC-cedd827f7f0174ef152a6e2216a706070792301e.tar.xz |
* Added some new syntax options for the Monitor Module's HTTP poll.
Diffstat (limited to 'OpenSim')
-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 | { |