Skip to main content
Question

How can an SNMP trap be converted to JSON in Cribl Stream?

  • March 11, 2025
  • 2 replies
  • 19 views

Would like to be able to convert SNMP traps to JSON and then perform subsequent routing and enrichment leveraging the JSON content. Thanks.

2 replies

  • Author
  • New Participant
  • March 11, 2025

Turns out this was frighteningly trivial. I used the code function to JSON.stringify the events in the pipeline.


  • Participating Frequently
  • March 11, 2025

You might find eval a better choice than code for simple conversions like this - I think its more performant, definitely safer, and easier for the next developer behind you to grok.