| Cheshire Cat Computing http://steveshipway.org/forum/ |
|
| Nagios to collect data for MRTG/RRDTool/routers2.cgi http://steveshipway.org/forum/viewtopic.php?f=20&t=1677 |
Page 1 of 1 |
| Author: | msprague [ Thu Nov 20, 2008 7:19 am ] |
| Post subject: | Nagios to collect data for MRTG/RRDTool/routers2.cgi |
Hi folks, I been having a thought and I wanted to run it by y'all to see if I'm on a sane path. Currently we use nagios to monitor our stuff and a combination of mrtg and cacti to collect data for trend analysis. We would like to keep our monitoring/snmp traffic to a minimum if possible. So here is my thought. We could configure nagios to monitor and collect perf data along the way. I mean via active checks and not by using other tools in nagios like NRPE. Basically nagios would write the perf data to a file and another script would process that data and enter it into rrd files. Now we want to build graphs of this data. I don't want to write a custom web interface so I'd rather use MRTD/RRDTool and routers2.cgi. I think I could configure MRTG to not really collect any data (in the [Target] definition) by having run something like '/bin/true'. Or configure MRTG to parse the perf file(s) created by nagios would be another option. This setup would allow us to get real time monitoring and yet save that data for trend analysis. If it matters, this is a mix of routers, load balancers, switches and several hundred servers. So what do you think? Would data being collected from active nagios checks be okay? Would it be better to have MRTG parse the files generated by nagios or to have another script parse them and build the rrd files? Any input is appreciated. thanks, mikeS |
|
| Author: | stevesh [ Thu Nov 20, 2008 11:00 am ] |
| Post subject: | Re: Nagios to collect data for MRTG/RRDTool/routers2.cgi |
There are a couple of ways to achieve this. 1) Use the nagios agents for MRTG as well You can use the MRTG data collection plugins mrtg-pnsclient and mrtg-nrpe to allow MRTG to directly retrieve data from NRPE or NSclient. This means more queries, but only one agent - this is the method we use here. These data collection plugins are shipped with routers2. 2) Write Nagios perfdata to a file, create a MRTG plugin to query the file You can make Nagios dump perf data into a file, then create a MRTG data collection plugin to retrieve the most recent data from this file. This may be a good way to go, but risks using stale data. 3) Make the Nagios perfdata update the .rrd files directly In this case, you don't actually need to run MRTG on the cfg file at all - just let Routers2 reference the .cfg files so it knows how to build the graph images. We use a similar method to this to graph throughput of our spam check mail gateways. |
|
| Page 1 of 1 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|