[mrtg] MRTG and RAM Disk

Mick michaelkintzios at gmail.com
Fri Jan 30 07:31:46 CET 2015


On Friday 30 Jan 2015 05:13:09 Troy Lea wrote:
> I've been playing around with the idea of having MRTG use a RAM Disk.
> 
> Specifically on Nagios XI and CentOS.
> 
> I've been successfully able to define the current settings and it does work
> well.
> 
> LogDir: /var/nagiosramdisk/mrtg
> ThreshDir: /var/nagiosramdisk/mrtg
> WorkDir: /var/nagiosramdisk/mrtg
> 
> Using the RAM Disk improves performance, especially once you get into 4000+
> ports being queried.
> 
> The only problem I have is when I reboot the server the port files don't
> exist until the MRTG has run the first time. For example these files:
> 
> ub04_93.rrd
> ub04_94.rrd
> ub04_95.rrd
> ub04_96.rrd
> ub04_97.rrd
> ub04_98.rrd
> 
> This causes a problem with the check_rrdtraf program that looks for these
> files. The problem is overcome once MRTG runs the first time.
> 
> I'm wondering if MRTG has an option which will generate all these files
> without actually doing an SNMP query to all the devices.
> 
> Does anyone have any thoughts or suggestions on this topic?
> 
> Cheers
> 
> Troy

Couldn't you change the shutdown script for Nagios/mrtg to save the files to 
disk from ramdisk and then reload them before Nagios is started?

-- 
Regards,
Mick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.oetiker.ch/pipermail/mrtg/attachments/20150130/e6a450e8/attachment.pgp>


More information about the mrtg mailing list