[rrd-users] RRDTOOL and MRTG on LInux 5

Nabil BouDiab mr_bou at yahoo.com
Tue Sep 22 14:20:06 CEST 2009

Hi Steve,

Thanks again ... by threads you meant the fork option?? is this limited to the number of cpus or the number of cores in the system?
The 15,000 metrics you have, are they in multiple .cfg files?? i am just wondering why my 400 metrics are breaking although i am using FORK:2 
I also have 2 cpus with quad cores and memory utilization is almost null. it could be disk io as u mentioned, i have set some monitors for this and will check end of the week. 

so i will be breaking the 400 into two cfg files and run mrtg against the two. and at server startup i call them as follows:

start ()
LANG=C /data/mrtg-2/bin/mrtg

LANG=C /data/mrtg-2/bin/mrtg


Would this be correct ?? is this how you are splitting the configuration files?? 


----- 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: Sunday, September 20, 2009 4:05:22 AM
Subject: RE: [rrd-users] RRDTOOL and MRTG on LInux 5

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)


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??


----- 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.


rrd-users mailing list
rrd-users at lists.oetiker.ch


More information about the rrd-users mailing list