Collectd
From OpenSimulator
(Difference between revisions)
(Created page with "== What is collectd ? == Collectd is a daemon which collects system performance statistics periodically and provides mechanisms to store the values in a variety of ways, f...") |
Revision as of 22:26, 13 March 2012
What is collectd ?
Collectd is a daemon which collects system performance statistics periodically and provides mechanisms to store the values in a variety of ways, for example in RRD files. Website
Collectd config for OpenSim
As stated here : Monitoring Module, we can get region statistics using the url : http://sim:port/monitorstats/UUID of the region or region name. We can use the collectd curl_xml plugin to get xml values and store them in a rrd file. To do this, we need to enable the curl_xml plugin and define some dataset types.
- Create a file /etc/collectd/my_types.db
- Edit the file and add inside (i have put only generic limits but feel free to edit this page and adjust the ranges) :
opensim_agent_count value:GAUGE:0:U opensim_child_agent_count value:GAUGE:0:U opensim_gc_memory value:GAUGE:0:U opensim_object_count value:GAUGE:0:U opensim_physics_frame value:GAUGE:0:U opensim_physics_update value:GAUGE:0:U opensim_pws_memory value:GAUGE:0:U opensim_thread_count value:GAUGE:0:U opensim_total_frame value:GAUGE:0:U opensim_event_frame value:GAUGE:0:U opensim_land_frame value:GAUGE:0:U opensim_last_frame value:GAUGE:0:U opensim_time_dilatation value:GAUGE:0:U opensim_sim_fps value:GAUGE:0:U opensim_physics_fps value:GAUGE:0:U opensim_agent_updates_per_sercond value:GAUGE:0:U opensim_object_updates_per_second value:GAUGE:0:U opensim_active_object_count value:GAUGE:0:U opensim_active_scripts value:GAUGE:0:U opensim_script_events_per_second value:GAUGE:0:U opensim_in_paquets_per_second value:GAUGE:0:U opensim_out_paquets_per_second value:GAUGE:0:U opensim_unacked_bytes value:GAUGE:0:U opensim_pending_downloads value:GAUGE:0:U opensim_pending_uploads value:GAUGE:0:U opensim_total_frame_time value:GAUGE:0:U opensim_net_frame_time value:GAUGE:0:U opensim_physics_frame_time value:GAUGE:0:U opensim_simulation_frame_time value:GAUGE:0:U opensim_agent_frame_time value:GAUGE:0:U opensim_images_frame_time value:GAUGE:0:U
- Save the file and uncomment the line :
TypesDB "/usr/share/collectd/types.db" "/etc/collectd/my_types.db"
- Add the plugin options in /etc/collectd/collectd.conf :
LoadPlugin curl_xml <Plugin "curl_xml"> <URL "http://localhost:9000/monitorstats/myregion"> Instance "opensim" <XPath "/data"> Type "opensim_agent_count" ValuesFrom "AgentCountMonitor/text()" </XPath> <XPath "/data"> Type "opensim_child_agent_count" ValuesFrom "ChildAgentCountMonitor/text()" </XPath> <XPath "/data"> Type "opensim_gc_memory" ValuesFrom "GCMemoryMonitor/text()" </XPath> <XPath "/data"> Type "opensim_object_count" ValuesFrom "ObjectCountMonitor/text()" </XPath> <XPath "/data"> Type "opensim_physics_frame" ValuesFrom "PhysicsFrameMonitor/text()" </XPath> <XPath "/data"> Type "opensim_physics_update" ValuesFrom "PhysicsUpdateFrameMonitor/text()" </XPath> <XPath "/data"> Type "opensim_pws_memory" ValuesFrom "PWSMemoryMonitor/text()" </XPath> <XPath "/data"> Type "opensim_thread_count" ValuesFrom "ThreadCountMonitor/text()" </XPath> <XPath "/data"> Type "opensim_total_frame" ValuesFrom "TotalFrameMonitor/text()" </XPath> <XPath "/data"> Type "opensim_event_frame" ValuesFrom "EventFrameMonitor/text()" </XPath> <XPath "/data"> Type "opensim_land_frame" ValuesFrom "LandFrameMonitor/text()" </XPath> <XPath "/data"> Type "opensim_last_frame" ValuesFrom "LastFrameTimeMonitor/text()" </XPath> <XPath "/data"> Type "opensim_time_dilatation" ValuesFrom "TimeDilationMonitor/text()" </XPath> <XPath "/data"> Type "opensim_sim_fps" ValuesFrom "SimFPSMonitor/text()" </XPath> <XPath "/data"> Type "opensim_physics_fps" ValuesFrom "PhysicsFPSMonitor/text()" </XPath> <XPath "/data"> Type "opensim_agent_updates_per_sercond" ValuesFrom "AgentUpdatesPerSecondMonitor/text()" </XPath> <XPath "/data"> Type "opensim_object_updates_per_second" ValuesFrom "ObjectUpdatesPerSecondMonitor/text()" </XPath> <XPath "/data"> Type "opensim_active_object_count" ValuesFrom "ActiveObjectCountMonitor/text()" </XPath> <XPath "/data"> Type "opensim_active_scripts" ValuesFrom "ActiveScriptsMonitor/text()" </XPath> <XPath "/data"> Type "opensim_script_events_per_second" ValuesFrom "ScriptEventsPerSecondMonitor/text()" </XPath> <XPath "/data"> Type "opensim_in_paquets_per_second" ValuesFrom "InPacketsPerSecondMonitor/text()" </XPath> <XPath "/data"> Type "opensim_out_paquets_per_second" ValuesFrom "OutPacketsPerSecondMonitor/text()" </XPath> <XPath "/data"> Type "opensim_unacked_bytes" ValuesFrom "UnackedBytesMonitor/text()" </XPath> <XPath "/data"> Type "opensim_pending_downloads" ValuesFrom "PendingDownloadsMonitor/text()" </XPath> <XPath "/data"> Type "opensim_pending_uploads" ValuesFrom "PendingUploadsMonitor/text()" </XPath> <XPath "/data"> Type "opensim_total_frame_time" ValuesFrom "TotalFrameTimeMonitor/text()" </XPath> <XPath "/data"> Type "opensim_net_frame_time" ValuesFrom "NetFrameTimeMonitor/text()" </XPath> <XPath "/data"> Type "opensim_physics_frame_time" ValuesFrom "PhysicsFrameTimeMonitor/text()" </XPath> <XPath "/data"> Type "opensim_simulation_frame_time" ValuesFrom "SimulationFrameTimeMonitor/text()" </XPath> <XPath "/data"> Type "opensim_agent_frame_time" ValuesFrom "AgentFrameTimeMonitor/text()" </XPath> <XPath "/data"> Type "opensim_images_frame_time" ValuesFrom "ImagesFrameTimeMonitor/text()" </XPath> </URL> </Plugin>
- Save the file and restart collectd