[mrtg] Issues graphing an integer value from ServerTech Power Towers

Steve Shipway s.shipway at auckland.ac.nz
Tue Dec 30 22:05:31 CET 2008


> snmpwalk -v 2c -c ubaVcj8PYF ptxl0101a-eqla3.stk
> 1.3.6.1.4.1.1718.3.2.2.1.7.1.2
> Sentry3-MIB::infeedLoadValue.1.2 = INTEGER: 463 hundredth Amps
...
> Target[ptxl0101a-eqla3.stk.tower-a-infeed-a]:
> (1.3.6.1.4.1.1718.3.2.2.1.7.1.1&1.3.6.1.4.1.1718.3.2.2.1.8.1.1:community@
> ptxl0101a-eqla3.stk:::::2)
> MaxBytes[ptxl0101a-eqla3.stk.tower-a-infeed-a]: 20
...
> 2008-12-30 18:46:45 -- --log: Called:
> RRDs::tune(/var/www/mrtg/rrd/ptxl0101a-eqla3.stk.tower-a-infeed-a.rrd -a
> ds0:20 -a ds1:20 -d ds0:GAUGE -d ds1:GAUGE)
> 2008-12-30 18:46:45 -- --log: Calling:
> RRDs::update(/var/www/mrtg/rrd/ptxl0101a-eqla3.stk.tower-a-infeed-a.rrd,
> '1230662805:338:4')

You are missing a few things in your config.  This is what you should have:

Target[ptxl0101a-eqla3.stk.tower-a-infeed-a]: 
1.3.6.1.4.1.1718.3.2.2.1.7.1.1&1.3.6.1.4.1.1718.3.2.2.1.8.1.1
:community at ptxl0101a-eqla3.stk:::::2 / 100
MaxBytes[ptxl0101a-eqla3.stk.tower-a-infeed-a]: 20

Note the ' / 100' on the end of the Target definition.  Spaces are
significant.

Your SNMP query returns the value as an integer number representing
hundredths of an amp, so you need to subsequently divide by 100 , either in
the Target definition or in a Factor[] definition.  Best Practice is to
convert to SI units before storing so do the calculation in the Target
definition (use Factor[] if you want to do a multiplication between storing
and displaying, eg store a value as blocks but display as bytes).

Since you are retrieving hundredths of an amp, you retrieved a value of 338.
However, this is outside your maxBytes range of 0-20 so it is being
discarded and UNKNOWN stored.  By adding the '/ 100' (NOTE THE SPACES!) to
the end of the Target definition, all will be OK as the query will return
3.38 which is within the MaxBytes range.  If you use Factor[]:0.01 instead
you'll need to increase MaxBytes to 2000 as the MaxBytes check is done
before Factor[].

Thanks for providing so much detail about your problem, makes diagnosis much
easier.

Hope this helps,

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/20081231/7e4397a3/attachment-0001.bin 


More information about the mrtg mailing list