Interface MAC addresses don't display (and are missing from the DB) on some SNMP-capable nodes

Description

On SNMP-capable nodes, the MAC address of physical interfaces does not always show up in the DB (and therefore is missing from the web UI), even when the SNMP agent correctly reports the MAC address.

Example:

Cisco 2800 series router with nodeid 17:

  1. snmpget -v2c -c somestring cisco2800.mycorp IF-MIB::ifName.3 IF-MIB::ifPhysAddress.3 IF-MIB::ifName.4 IF-MIB::ifPhysAddress.4
    IF-MIB::ifName.3 = STRING: Gi0/0
    IF-MIB::ifPhysAddress.3 = STRING: 0:16:47:41:36:0
    IF-MIB::ifName.4 = STRING: Gi0/1
    IF-MIB::ifPhysAddress.4 = STRING: 0:16:47:41:36:1

opennms=# select nodeid,snmpifindex,snmpifname,snmpphysaddr from snmpinterface where nodeid=17 and (snmpifindex='3' or snmpifindex='4');

nodeid | snmpifindex | snmpifname | snmpphysaddr
---------------------------------+-------------- 17 | 3 | Gi0/0 |
17 | 4 | Gi0/1 |
(2 rows)

Environment

CentOS 5.6 Oracle JDK 6u26 OpenNMS 1.9.91 snapshot (from 8/24)

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Seth Leger October 27, 2011 at 4:23 PM

I think I've been able to fix this by using the same MAC address handling that I used in bug . Marking as fixed.

commit cee964fe979e6465aeb4e2efd4772e50ebc54831

Andy Ellsworth September 29, 2011 at 4:00 PM

FWIW, I noticed the same, but found plenty of counterexamples in my setup where single digit octets persisted just fine. Thanks for looking into this!

Seth Leger September 29, 2011 at 3:58 PM

One pattern that Matt noted was that MAC addresses with single digit octets (ie. 0:16:47:41:36:0) appear to fail. This could be a bug in the code that is parsing MAC address values. I'm working on some utility functions for this right now, marking as in progress.

Maxim Visnevskis September 20, 2011 at 3:15 AM

We found similar behavior with OpenNMS 1.8.13 (provisiond + default-foreign-source) on CentOS 6.0.
All SNMP capable nodes doesn’t have "snmpphyaddr" at all.

Andy Ellsworth September 19, 2011 at 11:33 PM

I have the full debug logs set aside for the rescan of the "good" and "bad" nodes above, but they contain a fair amount of sensitive data. Let me know if you need more than what's provided above and I can dig into scrubbing the logs.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created August 29, 2011 at 5:38 PM
Updated January 27, 2017 at 4:20 PM
Resolved October 27, 2011 at 4:23 PM