Hi team,
I have ruby handler in sensu core (older version). I used pipe to execute that handler to forward some events in json format. How can i achieve same thing in SENSU GO.
Please help!
Thanks
Vivek.
Hi team,
I have ruby handler in sensu core (older version). I used pipe to execute that handler to forward some events in json format. How can i achieve same thing in SENSU GO.
Please help!
Thanks
Vivek.
Hey,
So most likely what is happening is your custom ruby handler isn’t able to cope with the new event format used in Sensu Go. You’ll most likely need to adapt your handler to consume Sensu Go events. In the meantime, you should be able to continue using this version of the handler by mutating the Sensu Go event into a json that is compatibile with Sensu Core events. You have a couple of different options:
mutator-sensu-go-into-ruby.rb
mutator that comes with the updated sensu-plugin gem. It’s a stand-alone mutator command.I find its really helpful to use the sensuctl event info <entity> <check> --format json
command when building Sensu Go pipelines. I can see exactly what is going to be piped into the mutator and/or handler and test operation against an existing event.