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

Tobias Oetiker tobi at oetiker.ch
Thu May 24 08:42:23 CEST 2012


Hi Steve,

Today Steve Shipway wrote:

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

how about calling the option 'fiddle-with-arrival-time-of-data' ?

but yes, if you think this  is what we need to make users happy, by
all means, send a patch (and one for the documentation too).

cheers
tobi

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

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the mrtg-developers mailing list