I want to be able to extend sensu so as to make it capable to understand 6 levels of severity instead of 3 that sensu has (0,1,2). How can i extend so as to support 6 levels. I’m sure that this functionality can be extended in sensu, but not sure how to go about this.
One way i think of doing this is to create a new field in the event data and have my custom severity but when data is sent to sensu it maps it to the 3 severities that sensu understands. Something like this, (Again not sure if i can have all of this logic in the check definition…i guess would be in the check script to add a new field in the event data, like we can add to external check result.)
custom severity - 2,3,4 would map to sensu severity of 1 (WARN)
custom severity - 5,6 would map to sensu severity of 2 (Critical)
The other way would be to trigger events in sensu on a custom field (like a custom field, ‘severity’ for example ) . I looked into the code for sensu but couldn’t find any such functionality. Please correct me if i’m missing something.
If anybody could share some pointers/tips on what is the best way to achieve this in sensu.