[mrtg] Re: Starting/Stopping mrtg does funky stuff to archived data??

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Mon Dec 13 18:25:47 MET 1999


Dan Wentzel wrote:
> 
> Hello all,
> 
> 	I've been using mrtg 2.5.1 since June for about 30 interfaces and recently
> had a file corruption occur.  Before figuring out what was wrong, the cron job got
> commented out, so mrtg didn't collect anything for days.  When we restarted the
> cron, mrtg behaved like it was being started for the first time (i.e. two sets of error

The message can occur for (at least) two reasons:

-1- You have no logs.  This is when you start MRTG the first time.
-2- The logs are corrupted.  You write about file corruption so ...

> messages and then no more complaints..).  ONE of THREE different things happened
> to ALL the logfiles:
> 
> 1 - The data collected since June was still there and there were repeated values (i.e.
> a flat line for the off-period).  The new data was added to the logfile for each 5 minute
> firing of the cron and everything went along fine.  Everything BEFORE the cron was
> disabled is still there - no lost data.
> 

This is normal behaviour for an uncorrupted log with interrupted service.
MRTG does not know anything about the interface during the outage so it
cannot assume the device was down.  This way you get an easy to spot pattern.
It just copies the last known value and uses this to fill in the missing part.
It is not a problem, it is intended behaviour.  If you would like to change
it and log zero for unknown values, upgrade and use the "Unknaszero" keyword
(or something very similar to this; check the docs).

> 2 - The data collected since June was wiped out (everything set to zero in monthly
> and yearly), but there was a flat line (repeated values) during the switch off period...

The flat line is created the moment you restarted your monitoring.  See
above for the explanation.  This is an indication that you had at least a part
of your original logs available...

> New data is added by the cron like normal.  Everything BEFORE the cron was 
> disabled is gone, but everything DURING the cron being disabled is still there (those
> repeated values) - partial (well, more than partial) data lost.

...and the rest of the log seems to be missing.

> 
> 3 - Everything is wiped out and the whole thing starts from scratch.  Everything BEFORE,
> and DURING the cron being disabled is gone - total data loss.....
> 

This sounds like corrupted logs, including the first line.


Just my guess, no more no less:
it looks as if the rateup process was able to correctly process your
logfiles.  It was not able to write out a new file and so this file was
corrupted.  The next run, only a part could be read (as the rest was
absent).

If you do keep backups, restore the logs (stop cron first).
If you don't keep backups, er, you've just learned it the hard way.

Regards,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg



More information about the mrtg mailing list