diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs index 769af8d..b6a2025 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs | |||
@@ -1,7 +1,10 @@ | |||
1 | using System.Collections.Generic; | 1 | using System.Collections; |
2 | using System.Collections.Generic; | ||
2 | using System.Reflection; | 3 | using System.Reflection; |
3 | using log4net; | 4 | using log4net; |
4 | using Nini.Config; | 5 | using Nini.Config; |
6 | using OpenMetaverse; | ||
7 | using OpenSim.Framework; | ||
5 | using OpenSim.Region.CoreModules.Framework.Monitoring.Alerts; | 8 | using OpenSim.Region.CoreModules.Framework.Monitoring.Alerts; |
6 | using OpenSim.Region.CoreModules.Framework.Monitoring.Monitors; | 9 | using OpenSim.Region.CoreModules.Framework.Monitoring.Monitors; |
7 | using OpenSim.Region.Framework.Interfaces; | 10 | using OpenSim.Region.Framework.Interfaces; |
@@ -43,6 +46,26 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring | |||
43 | "monitor report", | 46 | "monitor report", |
44 | "Returns a variety of statistics about the current region and/or simulator", | 47 | "Returns a variety of statistics about the current region and/or simulator", |
45 | DebugMonitors); | 48 | DebugMonitors); |
49 | |||
50 | MainServer.Instance.AddHTTPHandler("/monitorstats/" + m_scene.RegionInfo.RegionID + "/", StatsPage); | ||
51 | } | ||
52 | |||
53 | public Hashtable StatsPage(Hashtable request) | ||
54 | { | ||
55 | string xml = "<data>"; | ||
56 | foreach (IMonitor monitor in m_monitors) | ||
57 | { | ||
58 | xml += "<" + monitor.ToString() + ">" + monitor.GetValue() + "</" + monitor.ToString() + ">"; | ||
59 | } | ||
60 | xml += "</data>"; | ||
61 | |||
62 | Hashtable ereply = new Hashtable(); | ||
63 | |||
64 | ereply["int_response_code"] = 200; // 200 OK | ||
65 | ereply["str_response_string"] = xml; | ||
66 | ereply["content_type"] = "text/xml"; | ||
67 | |||
68 | return ereply; | ||
46 | } | 69 | } |
47 | 70 | ||
48 | public void PostInitialise() | 71 | public void PostInitialise() |