[mrtg] Re: Not exact values on HTML page

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Fri Jul 27 16:35:32 MEST 2001


Mike Koch wrote:
> 
> I'm monitoring some variable with an external script as a target. The script
> returns correct values. Values in the log file are the correct ones.
> However, on the web page, the current value written under the graphs is
> slightly different : example :
> 
> In the LOG file :
> 996239888 0 9229
> 996239888 0 9229 0 9229
> 996239587 0 9169 0 9169
> 996239400 0 9105 0 9169
> 996239100 0 9239 0 9343
> 996238800 0 9326 0 9343
> 996238500 0 9316 0 9317
> 996238200 0 9300 0 9316
> ......
> 
> On the WEB page :
> Current Value: 9191

The answer is: resampling/normalizing.

MRTG doesn't work with values as fetched.  It always stores them in
normalized intervals.

> In the LOG file :
> 996239888 0 9229
> 996239888 0 9229 0 9229
> 996239587 0 9169 0 9169
> 996239400 0 9105 0 9169

The normalized intervals are
996239400 to 996239700 (to be stored at 996239700)
996239700 to 996240000 (to be stored at 996240000)

The calculated rate 9169 was valid from 996239400 to 996239587
This defines part of the interval 996239400 to 996239700.
The other part of the interval has a rate of 9229.

So, (996239587-996239400 = ) 187 seconds at rate 9169
(300-187 = ) 113 seconds at rate 9229
Average rate is 187/300*9169 + 113/300*9229 = 9191
(the numbers are truncated to the integer).

If you check your log file now, find the value at time 996239700.
It will be 9191.

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