[mrtg] unknown values recorded as '0' when using multi target syntax

Irwin Tillman irwin at princeton.edu
Tue Feb 5 00:04:26 MET 2002


Platform: mrtg 2.9.17 with rrdtool 1.0.33

For targets that use the Multi Targets syntax, e.g. 

   Target[test.pps]: ifInUcastPkts.1&ifOutUcastPkts.1:public at router + ifInNUcastPkts.1&ifOutNUcastPkts.1:public at router

if one (or more) of the SNMP GETs fails (e.g. device is offline), instead of recording UNKNOWN for 
the resulting value in the RRD database, zero is recorded for the value.   (I've *not* specified 
the 'unknaszero' option.)

I didn't find anything about this in the mailing list archive.
I've looked through the code, trying to locate where the values comprising a multi target 
are combined, but I've not been able to locate that piece of code.  (I expected to find that 
I'd simply need to add a special case, to say that if any of these component values is UNKNOWN, 
then the resulting value should also be UNKNOWN.)  Can anyone point me to where in the code
this is handled?  (Or provide a fix.)

This behavior causes a problem, of course, because for a COUNTER it makes it look like
a counter wrap has occurred.  (It produces a  spike in the AVERAGE values when we lose
communication with the device, and again when we recover communication.)



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