Hi,
I have been investigating receiving traps in librenms, so far traps from my ups seem to be working correctly. However, I have added a Juniper router and now I am seeing a few errors in the librenms log
it really looks like the IP.php is not able to parse the Hex-STRING correctly… it’s grabbing more from oid than it’s supposed to…
Unknown bgp peer handling bgpBackwardTransition trap
and
production.ERROR: Could not parse into IP: 920010504003900000000000000000084 {“exception”:" object] (LibreNMS\Exceptions\InvalidIpException(code: 0): Could not parse into IP: 920010504003900000000000000000084 at /opt/librenms/LibreNMS/Util/IP.php:70)
[stacktrace]
#0 /opt/librenms/LibreNMS/Snmptrap/Handlers/JnxBgpM2BackwardTransition.php(51): LibreNMS\Util\IP::fromHexString(‘920010504003900…’)
#1 /opt/librenms/LibreNMS/Snmptrap/Dispatcher.php(49): LibreNMS\Snmptrap\Handlers\JnxBgpM2BackwardTransition->handle(Object(App\Models\Device), Object(LibreNMS\Snmptrap\Trap))
#2 /opt/librenms/snmptrap.php(28): LibreNMS\Snmptrap\Dispatcher::handle(Object(LibreNMS\Snmptrap\Trap))
#3 {main}
"}
in my snmptrapd log I see the following as well:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1043803230) 120 days, 19:27:12.30 SNMPv2-MIB::snmpTrapOID.0 = OID: BGP4-V2-MIB-JUNIPER::jnxBgpM2BackwardTransition BGP4-V2-MIB-JUNIPER::jnxBgpM2PeerLocalAddrType.0.ipv6."…9… …9…" = INTEGER: ipv6(2) BGP4-V2-MIB-JUNIPER::jnxBgpM2PeerLocalAddr.0.ipv6."…9… …9…" = Hex-STRING: 20 01 05 04 00 39 00 00 00 00 00 00 00 00 00 10 BGP4-V2-MIB-JUNIPER::jnxBgpM2PeerRemoteAddrType.0.ipv6."…9… …9…" = INTEGER: ipv6(2) BGP4-V2-MIB-JUNIPER::jnxBgpM2PeerRemoteAddr.0.ipv6."…9… …9…" = Hex-STRING: 20 01 05 04 00 39 00 00 00 00 00 00 00 00 00 84 BGP4-V2-MIB-JUNIPER::jnxBgpM2PeerLastErrorReceived.0.ipv6."…9… …9…" = Hex-STRING: 00 00 BGP4-V2-MIB-JUNIPER::jnxBgpM2PeerLastErrorReceivedText.0.ipv6."…9… …9…" = STRING: BGP4-V2-MIB-JUNIPER::jnxBgpM2PeerState.0.ipv6."…9… …9…" = INTEGER: connect(2) SNMPv2-MIB::snmpTrapEnterprise.0 = OID: JUNIPER-CHASSIS-DEFINES-MIB::jnxProductNameMX480
Jan 15 14:51:32 netmon.tor snmptrapd[12589]: In IP.php line 70:
Jan 15 14:51:32 netmon.tor snmptrapd[12589]: Could not parse into IP: 920010504003900000000000000000084
any help would be appreciated.
thanks.