Closed fguimond closed 5 years ago
Create an abstraction to execute Sensu Mutators (https://docs.sensu.io/sensu-go/5.5/reference/mutators/). Mutators accept a Sensu event, transform the event and returns the output JSON.
The first version of this repository contains an abstraction for the common Sensu handles logic. The abstraction is responsible to
We want to implement something similar for mutators.
The similarities and differences are:
stdin
stdout
stderr
How to implement
Path
sensu.NewGoMutator
sensu.NewGoHandler
func(event *types.Event) (*types.Event, error)
0
1
Unit tests are required.
Sensu Go Plugin Library
This has been implemented in https://github.com/sensu/sensu-plugins-go-library/pull/5.
Create an abstraction to execute Sensu Mutators (https://docs.sensu.io/sensu-go/5.5/reference/mutators/). Mutators accept a Sensu event, transform the event and returns the output JSON.
The first version of this repository contains an abstraction for the common Sensu handles logic. The abstraction is responsible to
We want to implement something similar for mutators.
The similarities and differences are:
stdin
stdout
orstderr
How to implement
Path
property since it defines where to look in the Sensu Event. Dependent on the support of configuration overridessensu.NewGoMutator
method instead ofsensu.NewGoHandler
https://github.com/sensu-skunkworks/sensu-aws-ec2-deregistration-handler/blob/sensu-auth/main.go#L31func(event *types.Event) (*types.Event, error)
0
, otherwise it is set to1
Unit tests are required.