[mrtg] MRTG Expressions/Counters

Tendolkar Mohit Mohit.Tendolkar at thomson.net
Mon Feb 28 21:53:23 MET 2005


This question is for folks who have used MRTG target expressions (multi
target syntax)

For target expressions where items in the expression could be an SNMP
counter variable, MRTG does not treat the value returned for each item
in the expression as a counter (for handling counter wrap arounds at the
SNMP variable level). It only handles counter wraps after evaluating the

For instance, 

for expression 

%InErrors ==> (ifInErrors / (ifInUcastPkts + ifInNUcastPkts)) * 100

ifInErrors, ifInUcastPkts and ifInNUcastPkts are all individual SNMP
counters and the overal resulting MRTG expression %InErrors is also a
counter (to show a rate of error ocurrances).

So in such cases MRTG would not track wrap around for values of
ifInErrors, ifInUcastPkts and ifInNUcastPkts - rather it would only
handle counter wrapping after it actually evaluated the result of the

This will give incorrect results when individual counter items in the
expression wrap around.

I wanted to know how you guys have handled such situations. 

Do you know of any other tools that handle expressions and take into
consideration counter wraps for each discrete item in the expression?

Do let me know


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