Open svalouch opened 3 years ago
Seems like this could be PhysAddress
TEXTUAL-CONVENTION
From SNMPv2-TC:
PhysAddress ::= TEXTUAL-CONVENTION
DISPLAY-HINT "1x:"
STATUS current
DESCRIPTION
"Represents media- or physical-level addresses."
SYNTAX OCTET STRING
If we could automatically handle the length, it would simplify things.
Fibre Channel and other storage-related communication protocols use longer physical addresses, namely 64 bits instead of 48 bits as used for MAC addresses. The existing
PhysAddress48
type truncates the WWN to 48 bits, rendering it unusable. There are 16 byte / 128 bit WWNs, but I haven't encountered any of those yet. Wikipedia article: World Wide Name.Device is a Brocade 5100 or 6510 FC-switch using the Brocade SW-MIB. The
swFCPortWwn
is defined as follows:snmpwalk
returns the following for the OID (except, port number 1):Configuration used for testing:
This yields the following output when queried:
If I change the type to
PhysAddress48
, it looks as follows, which misses the last two elements:The output I want:
I guess the easiest way would be to add a
PhysAddress64
data type that has a higher length limit. The other way would be to add a type that can contain both 48 and 64 bit addresses. The PostgreSQL macaddr8 data type documentation talks about how to represent one in the other, I personally don't think that something like that would be worth implementing and the exporter should simply reformat the existing data according to the type set by the user. I don't know if it is possible for devices to return either 64 or 48 bit values if there's a FC over IP or IP over FC scenario and I can't test this, i.e. if there's any vendor defining a long OCTET STRING and depending on the usage of the specific port return a shorter or longer value.Version
snmp-exporter 0.19.0
MIB used
Brocade SW-MIB An outdated, but still usable version: https://github.com/librenms/librenms/blob/master/mibs/brocade/SW-MIB#L1478