[mrtg-developers] MRTG parsing OID's with dashes in - Bug or Feature?

Dan mrtg at dandoore.com
Thu Jul 6 22:10:33 MEST 2006

This was originally posted to the mrtg list but elicited no responses so 
I am reposting to the developers list, hopefully someone can point me in 
the right direction.


I have imported a custom MIB for my router which has dashes ('-'s) in 
the object names for example the TX bytes for PPP Interface 0 is

ppp-0-stats-txbytes OBJECT-TYPE
	MAX-ACCESS read-write
	STATUS current
	::= { ppp-0-stats 2 }

There's no issue importing the MIB with LoadMIBs: but MRTG cannot parse 
the ppp-0-stats-txbytes:

MRTG config line:


MRTG Output:

ERROR: Target[router_ppp_0][_IN_] 
'ppp-0-stats-rxbytes.0&ppp-0-stats-txbytes. $target->[0]{$mode} '
(warn): Ambiguous use of & resolved as operator & at (eval 10) line 1.
ERROR: Target[router_ppp_0][_OUT_] 
'ppp-0-stats-rxbytes.0&ppp-0-stats-txbytes. $target->[0]{$mode} '
(warn): Ambiguous use of & resolved as operator & at (eval 11) line 1.

MRTG Version is 2.12.2-2 as bundled with SuSE OSS-10

If I use snmpget from the command line on ppp-0-stats-txbytes it returns 
the correct value plus if I hack the MIB and take out the dashes so it's 
'ppp0statsrxbytes' it works fine, e.g:

# snmpget -v1 -m:/home/dan/sarian.mib -c public router ppp-0-stats-txbytes.0
SARIAN::ppp-0-stats-txbytes.0 = INTEGER: 7291724

# snmpget -v1 -m:/home/dan/sarian-hacked.mib -c public router 
SARIAN::ppp0statstxbytes.0 = INTEGER: 7291832

So is this a limitation of MRTG that can be circumvented or a bad 
character in the MIB that I need to gripe to the vendor about?

A quick check of the RFCs states that the OID should be "ASCII" so 
that's helpful :-)


Unsubscribe mailto:mrtg-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-developers-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/mrtg-developers

More information about the mrtg-developers mailing list