[mrtg] Config file help

Steve Shipway s.shipway at auckland.ac.nz
Tue Jan 20 05:23:04 CET 2009


> The first output is total time on battery from last restart, not total
> time remaining.  The second output is always 0, the script outputs a 0
> just in case the "noo" option was missed.  The third output will be the
> current up time when I get it fixed.  The forth output is the device name.
> 
> I don't think I want the gauge option, I want to count how many seconds
> on battery from the last power failure, not from last restart.
> Hopefully they're not the same.

You do need 'gauge' - this says to graph the value as given, rather than the
rate of change of this value.  There's no way to do exactly what you want,
as MRTG has no way of knowing when the last power failure was - your choices
are to graph it as one of:

COUNTER - the default, which is y=(current_value -
previous_value)/time_interval, if (current_value>previous_value)
GAUGE - y=current_value
ABSOLUTE - y=current_value/time_interval
DERIVE - like COUNTER, but without the requirement that
current_value>previous_value

There is also the caveat that all values are time window normalised, which
will change them slightly.  This is only apparent when you have small values
and GAUGE type.

If you really want to do seconds since last failure, you will need to
calculate when the last failure was in your script, and subtract this value
from the retrieved value before giving the output to MRTG.

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


More information about the mrtg mailing list