aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorAdam Frisby2009-11-11 00:22:06 +1100
committerAdam Frisby2009-11-11 00:22:06 +1100
commit90b15aa440a6a7d8ddae6df6006aff8010d21405 (patch)
tree5684db8ea6fa602f5111a2433310725f8b50127d /OpenSim/Region/CoreModules
parentFixed XMLRPC return params (diff)
downloadopensim-SC_OLD-90b15aa440a6a7d8ddae6df6006aff8010d21405.zip
opensim-SC_OLD-90b15aa440a6a7d8ddae6df6006aff8010d21405.tar.gz
opensim-SC_OLD-90b15aa440a6a7d8ddae6df6006aff8010d21405.tar.bz2
opensim-SC_OLD-90b15aa440a6a7d8ddae6df6006aff8010d21405.tar.xz
* Added HTTP polling for Statistics Monitor Module (access via http://sim.com:httpport/monitorstats/regionUUID/)
* Returns simple formatted XML document containing statistical data on the current sim. * Example: <data> <AgentCountMonitor>5.0000</AgentCountMonitor> ... </data>
Diffstat (limited to 'OpenSim/Region/CoreModules')
-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()