[rrd-users] RRDTOOL and MRTG on LInux 5

Steve Shipway s.shipway at auckland.ac.nz
Sun Sep 20 03:05:22 CEST 2009


To fail over the MRTG processes, we just enabled/disabled CRON jobs using custom LinuxHA scripts.  Subsequently, we just killed/restarted the MRTG daemons, using the init.d scripts.

You can run any number of MRTG threads, either by having multiple MRTG processes (this may be better if you are using CRON), or by using the 'Threads:' directive in the MRTG .cfg file (this is better if you are using MRTG in Daemon mode).  You are limited by the number of CPUs and amount of memory in your server.

If you accidentally run two MRTG processes on the same CFG file, it wont break anything as MRTG takes care of locking the cfg file and will not update an RRD twice in one 5-min window anyway.

To give you some idea, we monitor 15,000 metrics on a dual 3GHz Xeon processor machine with 6GB memory (this needs the PAE kernel as it is >4GB).  We are limited by the disk I/O bandwidth with this many RRD updates every second (as we use multiple MRTG instances).  However, if you use RRDTool 1.3.x and MRTG in daemon mode then it takes advantage of the memory-mapped IO improvements in RRD 1.3 and you get much better performance (we cannot yet do this due to the nature of some of the queries requiring them to be done strictly sequentially to each other)

Steve

________________________________________
From: rrd-users-bounces at lists.oetiker.ch [rrd-users-bounces at lists.oetiker.ch] On Behalf Of Nabil BouDiab [mr_bou at yahoo.com]

How did you manage to fail over the MRTG processes? did you create your own monitoring agents? or used generic agents from linux HA?
i have recently reached a limitation on the number of monitored routers and my mrtg tools is crashing. is it safe to run two mrtg processes on the same instance each with a different cfg file?? or do i need to seperate them into different linux instances??


Regards,
Nabil




----- Original Message ----
From: Steve Shipway <s.shipway at auckland.ac.nz>
To: Nabil BouDiab <mr_bou at yahoo.com>; "rrd-users at lists.oetiker.ch" <rrd-users at lists.oetiker.ch>
Sent: Thursday, September 17, 2009 12:50:25 AM
Subject: RE: [rrd-users] RRDTOOL and MRTG on LInux 5

> - Is anyone running rrdtool and mrtg on linux 5.4 ?

Yes, we are (RHEL 5.3 just updated to 5.4)

> - anyone managed to integrate the MRTG process into a cluster? for
> automatic failover?

Yes, we have been doing this for more than 2 years.  We have 2 linux boxes linked with LinuxHA and a shared external SSA disk unit.  The filesystem, virtual IP and MRTG processes fail over between the two.  The 'non-active' server hosts our Nagios installation which fails over in the opposite direction.

In fact, we now have distributed MRTG as we monitor so many metrics, and have 2 such failover pairs and a single non-failover all linked into one big virtual frontend using the Routers2 distributed-MRTG features.

Steve





_______________________________________________
rrd-users mailing list
rrd-users at lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


More information about the rrd-users mailing list