A number of days ago I posted a question around decoding SNMP trap values sourced from Juniper devices for BFD and BGP, OpenNMS just seems to pass through the hex value to events for IP addresses rather than translate to IP string.
observed not just with Juniper traps but also DISMAN-PING which juniper uses
I decided to try use the event translator to enrich the events coming from the Juniper kit to:
a. convert the hex value in an SQL query
b. lookup some more info on the host and interface
but only to find some very strange behaviour in the debug logs
My sql query returns nothing because there is no match against the traps value
2019-07-05 09:50:00,145 DEBUG [event-translator-Thread] o.o.n.c.EventTranslatorConfigFactory: AttributeValueSpec.matches: Event attributeValue: wKj6FQ== doesn’t match pattern: Optional[^0x(.*?)$]
looking at the debug logs OpenNMS seems to encode the value in base64 is this a bug?
.188.8.131.52.184.108.40.206.220.127.116.11.18.104.22.168.22.214.171.124.126.96.36.199.188.8.131.52.101.115.116 = OctetString(base64): wKj6FQ==
thanks in advance.