[mrtg] rateup not calculating Max/average/current graph values correctly when using gauge option

Steve Shipway s.shipway at auckland.ac.nz
Thu Nov 3 02:31:12 CET 2011


> Unless I misconfigured or misunderstand the gauge option, the graph should
> display the given value as-is, immediately.
...
> Why is the HTML graph not showing Max=100, avg=100, cur=100?

Because, you misunderstand the gauge option.

What you have not taken into consideration is the dreaded DATA NORMALISATION done by MRTG - this is adjusting the received value to what it would have been on the interval boundary, assuming a linear pattern.

EG assume you have a 5min interval.
At 12:00 value 10 is logged.  This goes into the 12:00:00 - 12:04:59 bucket as-is, since it is on the first point of the interval.
At 12:06 value 22 is logged.  Since this is a bit late, this is averages over the 6 mins to give a rate of change of +2/min and so the value 20 is stored in the 12:05:00 - 12:09:59 bucket.

This behaviour makes a lot of sense if you're working with large numbers and the Counter data type (such as for network interface traffic).  If is a bit more troublesome if what you are measuring is a small gauge, such as temperature or pages printed.

Currently there is no way to disable data normalisation.  What you can do is to ensure the data is logged on the time window boundary, ie at 12:00, 12:05, and so on.  Manual calls to RRDTool (or rateup) can do this simply by using an explicit time rather than 'N'.  MRTG can do it by making this particular cfg file be processed ever 5min boundary (use cron to force the run at */5)

Tobi has several times been requested for an RRDTool data type that is like 'gauge but without normalisation' but I believe it is a bit harder to achieve programmatically than it would initially appear due to the way RRDTool works.

Steve


Steve Shipway
ITS Unix Services Design Lead
University of Auckland, New Zealand
Floor 1, 58 Symonds Street, Auckland
Phone: +64 (0)9 3737599 ext 86487
DDI: +64 (0)9 924 6487
Mobile: +64 (0)21 753 189
Email: s.shipway at auckland.ac.nz
 Please consider the environment before printing this e-mail 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4928 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20111103/f69d85c9/attachment-0001.bin 


More information about the mrtg mailing list