I'm trying to measure the received BGP-Prefixes on a Cisco Router. I'm having trouble because I don't know exactly how to build the following in the SNMP XML:
The number of received prefixes is stored in a oid which has a suffix after the peer IP:
CISCO-BGP4-MIB::cbgpPeerAcceptedPrefixes.10.10.10.2.ipv4.unicast
or in numeric form:
.1.3.6.1.4.1.9.9.187.1.2.4.1.1.10.10.10.2.1.1
So the index would be 10.10.10.2 but with the additional suffix of .1.1 for ipv4 unicast
I now could use an oid_index_parse like this
Code: Select all
<oid_index_parse>OID/REGEXP:.*\.([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.1\.1)$</oid_index_parse>
.1.3.6.1.2.1.15.3.1.7.10.10.10.2
Now when I use
Code: Select all
<oid_index_parse>OID/REGEXP:.*\.([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\.1\.1$</oid_index_parse>
It seems to me that this is not possible, I think it would require something like this:
Code: Select all
<receivedRoutes>
<name>receivedRoutes</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9.9.187.1.2.4.1.1</oid>
<suffix>.1.1</suffix>
</receivedRoutes>
Is there a way to make this work? Am I missing something?