SNMP working but interfaces not discovered (Cisco 6k only)

Hi, I have a working OpenNMS instance that collects SNMP interface statistics fine from numerous device types, however it doesn’t detect SNMP interfaces for Cisco 6k platform. OpenNMS version 26.2.1.

SNMP to the device is working but SNMP interfaces aren’t discovered as shown below. The sysObjectID matches the oidmask in mib2.xml datacollection.

mib2.xml

   <systemDef name="Enterprise">
      <sysoidMask>.1.3.6.1.4.1.</sysoidMask>
      <collect>
         <includeGroup>mib2-X-interfaces</includeGroup>
         <includeGroup>mib2-interface-errors</includeGroup>
         <includeGroup>mib2-tcp</includeGroup>
      </collect>
   </systemDef>

To troubleshoot this I ran collection from the Karaf shell and the interfaces don’t show up here either. This data is what OpenNMS is collecting, but no interfaces are returned.

admin@opennms> collect --node 604 org.opennms.netmgt.collectd.SnmpCollector 10.162.214.189
...node[604]
	Group: mib2-tcp
		node[604].tcpActiveOpens [.1.3.6.1.2.1.6.5] = 819378
		node[604].tcpPassiveOpens [.1.3.6.1.2.1.6.6] = 37622
		node[604].tcpAttemptFails [.1.3.6.1.2.1.6.7] = 6
		node[604].tcpEstabResets [.1.3.6.1.2.1.6.8] = 856993
		node[604].tcpCurrEstab [.1.3.6.1.2.1.6.9] = 1
		node[604].tcpInSegs [.1.3.6.1.2.1.6.10] = 33424525
		node[604].tcpOutSegs [.1.3.6.1.2.1.6.11] = 51247370
		node[604].tcpRetransSegs [.1.3.6.1.2.1.6.12] = 403
		node[604].tcpInErrors [.1.3.6.1.2.1.6.14] = 0

I setup per device debug as suggested here. Below is the log output for the device.

tail -f opennms-server-collectd.log
2021-02-26 19:45:38,980 INFO  [Collectd-Thread-39-of-50] NODE:sc1-a01-6k1-1 o.o.n.c.CollectableService: run: starting new collection for 604/10.162.214.189/SNMP/example1
2021-02-26 19:45:43,948 INFO  [Collectd-Thread-39-of-50] NODE:sc1-a01-6k1-1 o.o.n.c.CollectableService: run: finished collection for 604/10.162.214.189/SNMP/example1
2021-02-26 19:50:44,696 DEBUG [Collectd-Thread-16-of-50] NODE:sc1-a01-6k1-1 o.o.n.c.CollectableService: ReinitializationFlag set for 10.162.214.189
2021-02-26 19:50:44,703 DEBUG [Collectd-Thread-16-of-50] NODE:sc1-a01-6k1-1 o.o.n.c.DefaultSnmpCollectionAgent: initialize: db retrieval info: nodeid = 604, address = 10.162.214.189, primaryIfIndex = -1, isSnmpPrimary = P, sysoid = .1.3.6.1.4.1.9.12.3.1.3.1308
2021-02-26 19:50:44,704 DEBUG [Collectd-Thread-16-of-50] NODE:sc1-a01-6k1-1 o.o.n.c.DefaultSnmpCollectionAgent: initialize: db retrieval info: node 604 does not have a legitimate primaryIfIndex.  Assume node does not supply ipAddrTable and continue...
2021-02-26 19:50:44,705 DEBUG [Collectd-Thread-16-of-50] NODE:sc1-a01-6k1-1 o.o.n.c.DefaultSnmpCollectionAgent: initialize: initialization completed: nodeid = 604, address = 10.162.214.189, primaryIfIndex = -1, isSnmpPrimary = P, sysoid = .1.3.6.1.4.1.9.12.3.1.3.1308
2021-02-26 19:50:44,705 DEBUG [Collectd-Thread-16-of-50] NODE:sc1-a01-6k1-1 o.o.n.c.CollectableService: Completed reinitializing SNMP collector for 604/10.162.214.189/SNMP
2021-02-26 19:50:44,705 INFO  [Collectd-Thread-16-of-50] NODE:sc1-a01-6k1-1 o.o.n.c.CollectableService: run: starting new collection for 604/10.162.214.189/SNMP/example1
2021-02-26 19:50:48,538 INFO  [Collectd-Thread-16-of-50] NODE:sc1-a01-6k1-1 o.o.n.c.CollectableService: run: finished collection for 604/10.162.214.189/SNMP/example1

The device has a primary SNMP interface set in the requisition.

Any assistance to diagnose this further is appreciated. Thanks!

Jason

1 Like

The Cisco 6K doesn’t have a primary ipAddressTable or ipAddrTable which leads to the debug message node 604 does not have a legitimate primaryIfIndex. It is a L2 switch so the only IP is the management interface. So this seems normal.

admin@opennms> snmp-walk 10.162.214.189 .1.3.6.1.2.1.4.34 <<-- ipAddressTable
admin@opennms> snmp-walk 10.162.214.189 .1.3.6.1.2.1.4.20 <<-- ipAddrTable
admin@opennms>

However OpenNMS doesn’t detect any of the physical interfaces to monitor basic mib2 statistics.

Any suggestions on how to troubleshoot this, or what the problem might be with Cisco 6k?

Can you share a full snmpwalk of the device?

Lots of sensitive information in a full walk. I collected the output from .1.3.6.1 and sanitized it, but I can’t attach it here. It has all of the mib2 interface statistics and ifIndex matches.

We have an old instance of PRTG we’re migrating off of that can collect the interface statistics fine so I don’t think it’s a problem with the data being available. I suspect it is an issue with OpenNMS parsing the interface table but I don’t know how to see what is breaking down. If it’s really useful to see this data, I can upload it somewhere to share.