[mrtg] Converting mebibytes

Steve Shipway s.shipway at auckland.ac.nz
Tue Dec 14 20:50:20 CET 2010


>I read about multiplying the received values but that apparently can only
>use another OID and I don´t think there will be any OID that has the
>needed number and that also doesn´t change over time.
>
>How can I solve this problem? Will there be the possibility to use numbers
>instead of OIDs for multiplying in a future version of MRTG?

You can already use constants in an MRTG Target definition.

e.g:

Target[xxx]: oid1&oid2:community at device * 1024

if the OIDs return values in k.  Note the required spaces around the operations and constants.  You can even use brackets and +-*/ and so on.

Note though that SNMP generally returns integers so this may not help in your specific issue

It is generally Best Practice to use calculations on the Target line to convert the returned data to SI units (IE, to bytes rather than leaving it as K) so that the stored values are in SI units; then, use the Factor[] directive to make any display-time changes (eg, divide by 4096 if you want the value displayed in Blocks)

Steve


Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
s.shipway at auckland.ac.nz
Ph: +64 9 373 7599 ext 86487




More information about the mrtg mailing list