How can an SNMP trap be converted to JSON in Cribl Stream?
plummcrazy
Posts: 2 ✭
in Stream
Would like to be able to convert SNMP traps to JSON and then perform subsequent routing and enrichment leveraging the JSON content. Thanks.
0
Answers
-
Turns out this was frighteningly trivial. I used the code function to JSON.stringify the events in the pipeline.
0 -
You might find
eval
a better choice thancode
for simple conversions like this - I think its more performant, definitely safer, and easier for the next developer behind you to grok.0