[mrtg] how to bgp count update?

Steve Shipway s.shipway at auckland.ac.nz
Wed Dec 26 21:40:59 CET 2007


> [mrtg at hostname mrtg]$ /usr/local/mrtg/bin/mrtg /home/mrtg/cfg/test.cfg
> ERROR: Target[gw1][_IN_] ' $target->[0]{$mode} ' did not eval into
> defined data
> ERROR: Target[gw1][_OUT_] ' $target->[0]{$mode} ' did not eval into
> defined data

This means you have the wrong OID number in the Target[] definition.

Here are the OIDs which your device knows, one for each interface.
Remember that SNMPv2-SMI::mib-2 = 1.3.6.1.2.1

> [mrtg at hostname mrtg]$ snmpwalk -v 2c -c public 172.30.0.10
> .1.3.6.1.2.1.15.3.1.10
> SNMPv2-SMI::mib-2.15.3.1.10.172.30.0.10 = Counter32: 556
> SNMPv2-SMI::mib-2.15.3.1.10.172.30.0.19 = Counter32: 1374
> SNMPv2-SMI::mib-2.15.3.1.10.172.30.1.2 = Counter32: 45250
> SNMPv2-SMI::mib-2.15.3.1.10.203.192.165.188 = Counter32: 1732890
> SNMPv2-SMI::mib-2.15.3.1.10.203.248.249.146 = Counter32: 0
> SNMPv2-SMI::mib-2.15.3.1.10.211.233.24.155 = Counter32: 6
> SNMPv2-SMI::mib-2.15.3.1.10.211.233.55.54 = Counter32: 5
> SNMPv2-SMI::mib-2.15.3.1.10.211.233.95.206 = Counter32: 181

Here is your Target[] definition:

> Target[gw1]:  
>
1.3.6.1.2.1.15.3.1.10.1&1.1.3.6.1.2.1.15.3.1.11.1:public at 172.30.0.10::::
:2

This is wrong!  Your OIDs are defined as:
1.3.6.1.2.1.15.3.1.10.1
1.1.3.6.1.2.1.15.3.1.11.1

The second one has the extra '1.' at the beginning.  Also, none of these
match the ones above.  So, if you want to have the numbers for the
'203.192.165.188' interface, you should use:

1.3.6.1.2.1.15.3.1.10.203.192.165.188
1.3.6.1.2.1.15.3.1.11.203.192.165.188

So, this means, 

Target[gw1]:
1.3.6.1.2.1.15.3.1.10.203.192.165.188&1.3.6.1.2.1.15.3.1.11.203.192.165.
188:public at 172.30.0.10:::::2

Of course you might want to have a new target for each interface.   I
hope this helps,

Steve



More information about the mrtg mailing list