[mrtg] mrtg log
s.shipway at auckland.ac.nz
Wed Dec 12 01:15:28 CET 2007
On Mon, 2007-12-10 at 19:49 +0100, Pili Muñoz Gargallo wrote:
> I would like to use MRTG in adition to Nagios to monitor a net. I Know
> there's a plugin called check_mrtgtrafg which will allow me to
> monitor bandwith.
We do this here on a fairly large scale. Although you can use the perfparse stuff for Nagios, this was unacceptable because of the differences in polling frequency and because some things need to be graphed but not alerted, or alerted and not graphed.
Firstly, we use the mrtg-nrpe and mrtg-pnsclient plugins for MRTG to allow MRTG to query the Nagios agents on various servers, in addition to the normal SNMP checks (these plugins come with routers2)
Secondly, we have the hostextinfo url for each host set to the URL of the index page for the MRTG graphs of that particular server or device. This is easy since we use routers2 as the MRTG frontend.
Thirdly, we use the tonagios.cgi plugin for routers2 that allows the Nagios status for a host to be embedded into the routers2 frame.
Fourthly, we can't use the check_mrtgtraf because we run MRTG and Nagios on separate servers (actually in an HA cluster). So they poll independently. However if you use the same server then there is nothing to prevent you from using this check in Nagios.
Finally, we use the Weatherman program to make weathermaps. This already has a plugin to check the RRD files from MRTG, and I have created a new plugin for it to allow it to also check Nagios status for a host or service. It creates hybrid colours status weathermaps, with embedded links to the MRTG graphs and Nagios statuses.
I'd strongly advise you to make sure your Nagios Hostname is the same as the DNS hostname (possibly minus your domain name) and the same as the MRTG cfg filename (minus .cfg extension) as this greatly helps you to make generic links between the two. IE, Server foo.example.com is Nagios host 'foo' and MRTG config file foo.cfg.
If you need more details on how we achieved all this, drop me an email.
More information about the mrtg