[mrtg] Re: Spikes in MRTG graphs and logs... FOUND the PROBLEM

Schuyler Bishop SBishop at e-xpedient.com
Thu Jul 19 21:40:55 MEST 2001


Ok.  After I hacked MRTG to do my yearly stuff, I thought about a way those
of us using RRDTool with MRTG could get rid of the spikes.  Right before the
line that has (in 2.9.12a): (in sub writegraphics() )
RRDs::update("$rrd", "$time:$inlast:$outlast");

I put two lines (thanks to Tobi for the specific syntax):
$inlast = 'U' if int($inlast) == -1;
$outlast = 'U' if int($outlast) == -1;

That will update RRD with an Unknown, and RRDtool rolls the previous known
good poll to the next interval.  The net result is an empty "space" in the
graph instead of a spike.

For me, it's a great trade-off because most people don't notice the single
missing data point on the graph.

I've only tested it for 2 days, but it's worked flawlessly so far!!

-----Original Message-----
From: Schuyler Bishop [mailto:SBishop at e-xpedient.com]
Sent: Friday, June 29, 2001 10:19 AM
To: 'Alex van den Bogaerdt'
Cc: mrtg at list.ee.ethz.ch; 'mrtg-developers at list.ee.ethz.ch'
Subject: [mrtg-developers] Re: [mrtg] Re: Spikes in MRTG graphs and
logs... FOUND the PROBLE M



It seem to me that a change such as that wouldn't have any affect on the
problem.  I assume that when the current value is less than the previous
value, MRTG assumes a roll and subtracts the previous value from the
physical max (2^32), and then adds the current value.  If that is the case,
then the -1 will never be seen by RRDTool.

In my case, the previous poll was pretty low for both counters:

Thu Jun 28 17:20:02 2001        993763202       1790956512      706949457
Thu Jun 28 17:26:31 2001        993763591       -1      -1

So it reported a spike of 63.6 Mb/s in and 73.3 Mb/s out, since both
counters were pretty well below 2^32.

It seems to me that all that is needed is a check to see if the current poll
is less than zero, and if so, just report the previous value again (the same
behavior that is supposed to happen when it can't reach the host).

Something else that just struck me was the time of the second poll.  Look at
the longer list:

Thu Jun 28 16:50:02 2001        993761402       1706480626      694622514
Thu Jun 28 16:55:02 2001        993761702       1722315931      696090649
Thu Jun 28 17:00:02 2001        993762002       1738930880      697502371
Thu Jun 28 17:05:03 2001        993762303       1749758509      699396681
Thu Jun 28 17:10:02 2001        993762602       1767351428      702135803
Thu Jun 28 17:15:02 2001        993762902       1780673908      705778708
Thu Jun 28 17:20:02 2001        993763202       1790956512      706949457
Thu Jun 28 17:26:31 2001        993763591       -1      -1
Thu Jun 28 17:30:02 2001        993763802       1817929920      709769652
Thu Jun 28 17:35:02 2001        993764102       1831857443      712946868
Thu Jun 28 17:40:02 2001        993764402       1839530927      718236504
Thu Jun 28 17:45:02 2001        993764702       1856599412      721383317
Thu Jun 28 17:50:03 2001        993765003       1875336296      722845887
Thu Jun 28 17:55:03 2001        993765303       1885908745      724238206
Thu Jun 28 18:00:03 2001        993765603       1900195206      725823316
Thu Jun 28 18:05:03 2001        993765903       1906107396      727254246

Every other poll happens almost exactly at the same time except that one,
which is a full 90 seconds later!

What's the timeout for SNMP queries?

Schuyler

-----Original Message-----
From: Alex van den Bogaerdt [mailto:alex at slot.hollandcasino.nl]
Sent: Friday, June 29, 2001 4:42 AM
To: SBishop at e-xpedient.com
Cc: mrtg at list.ee.ethz.ch
Subject: Re: [mrtg] Re: Spikes in MRTG graphs and logs... FOUND the
PROBLE


Schuyler Bishop wrote:
>                                    (I'm using RRD...)

> So, why the heck is it reporting a negative number???  I would think that
if
> the poll is unsuccessful (for whatever reason - timeout?) then it would
> report a zero for the absolute value!

This I don't know.  However, if you're using RRDtool just use the
"rrdtool tune" command and set the minimum allowed value to 0.
If a negative number is reported, it will be discarded by RRDtool.

cheers,
-- 
   __________________________________________________________________
 / 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 |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

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

--
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