[mrtg] Spikes in MRTG graphs and logs...

Matt Walkowiak mwalkowi at intxx.com
Thu May 3 16:37:35 MEST 2001

Hi all.  I gots me a little problem...  Hope someone can help me out!

Im getting some very disturbing spikes in my MRTG graphs.  (mrtg-2.9.10)
Seems to happen when my Mrtg computer for whatever reason cannot see what it
is monitoring, like if I were to shut the interface down.  The cron jobs
still run, but no eth0 to talk with.
Anyway, I gotta smack those spikes down because I cannot see the real data
(like seeing a tree-covered mountain from a plane - cannot see the
individual trees, just lots of green).

The way I understand MRTG, if it does not receive data back from a device,
it will log 'last known good' data, rather than using zero or some random
number.  Why is mine graphing spikes?
If I cannot figure out what is wrong with MRTG and the occasional graphing
of spikes, I will need to manually "fix" those spikes.  See below.

I spent about 15 seconds coming up with a plan.  I was to use Sean Adams'
95%ile program to do some statistics on my log files to get the "real life"
maximum.  I have that implemented.  Then I was going to take that number and
use Matt Petach's very cool fix_bad_mrtg_logs.pl script to do the actual log
file fixing...  The only problem with this wonderful plan is I have to do it
to EVERY log file (they ALL have the spikes at the same time), which is
simple, but will be large and difficult to maintain and just plain yucky.

I think there is a better way.
Mrtg has a setting, AbsMax and/or MaxBytes, where it will ignore any data
that is over a certain limit.  My question is will those variables accept a
predefined variable?  Example to follow...

I have the 95% working.  It creates a file called mrtg_log.95 for each log
file (for the log file main_router.log, it creates another file
main_router.95) that has the 95% number as its data.   What I wanna do is
take that number:
LIMIT=`cat $LOGPATH/mrtg_log.95`
and put that into my mtrg config files:

Target[mrtg_device]: blah blah blah
MaxBytes[mrtg_device]: $LIMIT

Will this work?

Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the mrtg mailing list