Hello LibreNMS developers ,
TLDR; discovery-protocols.inc.php fails to discover cisco nexus which CDP advertises as sysName(SerialNumber) instead of sysName
Long version :
some cisco nexus switches send a formated string like FQDN(SerialNumber) as the snmp cdpCacheDeviceId value and you can’t tweak that through cisco IOS. LibreNMS retrieves the CDP information thanks to discovery-protocols.inc.php which does :
$cdp_array = snmpwalk_cache_twopart_oid($device, 'cdpCache', array(), 'CISCO-CDP-MIB');
This retrieves deviceID formatted as sysName(SerialNumber) in the case of nexus devices
Then $cdp is built but the SerialNumber in parenthesis is not removed and it causes the nexus device not to be identified as a neighbor.
To fix that, I suggest to check the format of cdpCacheDeviceId and remove the (SerialNumber) part from it thanks to a simple preg_replace call.
Would anyone please do it ?
I do have over 300 switches to monitor and tens of these are nexus switches. I thus have a hole in my map.
Thanks in advance and thank you for LibreNMS !