[mrtg] Logfile entries reset to zeroes after a few hours
s.shipway at auckland.ac.nz
Fri Apr 23 23:51:55 CEST 2010
All the values being reset to zero indicates that your .log file is being somehow deleted and re-created with no data. My guess is one of two things. Either :
a) You have some periodic job (eg, a 'tidy up' script) which is periodically removing the .log files for some reason. Maybe a coding error or somesuch is causing the files to be incorrectly deleted. To test for this, stop MRTG for a while, and see if the .log file disappear.
b) The permissions or ACLs on the directory holding the .log files is such that the MRTG process has problems during the update process. Normally (I think!) MRTG makes a copy of the .log file, updates this, then moves it back to replace the old one. Possibly (from the errors you report) a problem occurs during this move/rename process. Try doing a temporary chmod 777 on the directory and files to see if this fixes it (though this is not a good long-term solution of course). Do you have SELINUX installed -- this could be affecting rights to remove files, though create and update is OK? Do you accidentally have multiple MRTG processes running, such as one owned by root and one by a MRTG user? And so on.
The erros indicate problems in renaming the files. Check that there are not a load of *.tmp or *.old files hanging about in the directory (if so, delete them). Also run an fsck on the filesystem, in case there is filesystem corruption affecting the directory.
You might also like to consider moving to using MRTG with RRDTool instead of in Native mode (with .log files) as this is more powerful, albeit a bit more complex.
From: mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch [mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch] On Behalf Of Louis van Dyk [louis at qdcec.co.za]
Sent: Saturday, 24 April 2010 6:46 a.m.
To: mrtg at lists.oetiker.ch
Subject: [mrtg] Logfile entries reset to zeroes after a few hours
I have been running mrtg for many years on many different Linux boxes and have always had no problem with it. But now I am in desperate need of assistance.
I am running Fedora 12 and installed mrtg from the Fedora repository:
I am only monitoring ONE device and have set the following entry in root's crontab file:
*/5 * * * * env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
There are a number of interfaces being monitored on the device. The CFG file was configured with cfgmaker.
THE PROBLEM: Every few hours the logfile entries are reset to ZEROS through out the file, a few hours into the log file. It is apparently random, in that if I look at the graphs they all cut off at different times over the last 24 hours. So the graphs have only a few hours on each of them before flattening to zero.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mrtg