[mrtg-developers] Avoiding RRDTool's data normalisation for selected targets

Steve Shipway s.shipway at auckland.ac.nz
Thu May 24 07:14:32 CEST 2012


The Data Normalisation of RRDTool has some great reasons for its existence.
However, some times, we want to avoid it because it makes for
counter-intuitive graphs (even if they may be technically more accurate).

 

I suggest adding a new option, 'adjtime', which will cause all data samples
to be pushed back in time to the previous interval boundary, thus making
Data Normalisation a null operation.

 

This is easy to do!  Simply add 3 lines to mrtg and you're there (around
line 467) :

 

            debug('base', "Create Graphics");

+            if( $router->{ options }{ adjtime } ) {

+                $time -= ($time % $cfg{interval} )

+            }

            if ($rcfg{'options'}{'dorelpercent'}{$router}) {

 

You also need to add 'adjtime' to the @known_options array in the cfgcheck()
function in MRTG_lib.pm .

 

    my(@known_options) = qw(growright bits noinfo absolute gauge nopercent
avgpeak derive

                integer perhour perminute transparent dorelpercent

                unknaszero withzeroes noborder noarrow noi noo

-               nobanner nolegend logscale secondmean pngdate printrouter
expscale);

+              nobanner nolegend logscale secondmean pngdate printrouter
expscale  adjtime);


Now there are obvious downsides to this, not least that your data may be
pushed back in time almost 5 minutes and result in inaccurate graphs.
Multiple updates in a single interval would be rejected, and the potential
for missing an interval entirely would increase (but the heartbeat could be
raised to 610 to cope with the latter).  However, anyone choosing to use the
'adjtime' option would do so at their own risk.  The benefits would be that
MRTG users could finally ensure that retrieved values would definitely be
stored as-is, which helps when the variable is a low-valued integer Gauge.

 

Thoughts?

 

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:  <mailto:s.shipway at auckland.ac.nz> s.shipway at auckland.ac.nz

P Please consider the environment before printing this e-mail 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg-developers/attachments/20120524/8f2de1bf/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6080 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/mrtg-developers/attachments/20120524/8f2de1bf/attachment-0001.bin 


More information about the mrtg-developers mailing list