Hi Steve Thank you for your reply.
When I looked at the subjects of the e-mails coming back to root when with all the MRTG errors, I noticed that there were two distinct subject lines. You were correct in the last statement in (b) ... there were TWO MRTG processes being triggered. I had not realised that Fedora 12 installs a cron file as /etc/cron.d/mrtg. I had ALSO created one in root's crontab. Since removing the one (root's crontab) I no longer am getting errors in my mail, and so expect that the data will no longer be lost. Oh, and I was running SELinix, and re-applied permissions, which naturally made no difference. Thanks for the assistance. Perhaps you can add your answer to the FAQ somewhere? I saw a number of people asking the same question, but no real answer being given. Regards Louis On Sat, 2010-04-24 at 09:51 +1200, Steve Shipway wrote: > 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. > > Steve > > > ______________________________________________________________________ > From: [email protected] > [[email protected]] On Behalf Of > Louis van Dyk [[email protected]] > Sent: Saturday, 24 April 2010 6:46 a.m. > To: [email protected] > Subject: [mrtg] Logfile entries reset to zeroes after a few hours > > > > Hi > > 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: > mrtg-2.16.2-4.fc12.x86_64 > > 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. >
_______________________________________________ mrtg mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
