aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs25
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 @@
1using System.Collections.Generic; 1using System.Collections;
2using System.Collections.Generic;
2using System.Reflection; 3using System.Reflection;
3using log4net; 4using log4net;
4using Nini.Config; 5using Nini.Config;
6using OpenMetaverse;
7using OpenSim.Framework;
5using OpenSim.Region.CoreModules.Framework.Monitoring.Alerts; 8using OpenSim.Region.CoreModules.Framework.Monitoring.Alerts;
6using OpenSim.Region.CoreModules.Framework.Monitoring.Monitors; 9using OpenSim.Region.CoreModules.Framework.Monitoring.Monitors;
7using OpenSim.Region.Framework.Interfaces; 10using 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()