Custom Sensu Handlers to support a multi-tenant environment, allowing checks themselves to emit the type of handler behavior they need in the event json
I am not entirely convinced this is a good idea but it's easier to discuss working code than abstract thoughts so let's discuss.
Sensu::Handler hard codes timeout to 2 seconds in a couple of places. It bites us sometimes when our handlers try to connect to sensu-api to see whether a host or check is silenced. Percentage of handler invocations when this happens is minuscule (based on quick scan of sensu-server.log for one day on one sensu server) but it still could be a difference between paging on a silenced check or not.
In this hack, timeout(2) will actually become timeout(10).
I am not entirely convinced this is a good idea but it's easier to discuss working code than abstract thoughts so let's discuss.
Sensu::Handler hard codes timeout to 2 seconds in a couple of places. It bites us sometimes when our handlers try to connect to sensu-api to see whether a host or check is silenced. Percentage of handler invocations when this happens is minuscule (based on quick scan of sensu-server.log for one day on one sensu server) but it still could be a difference between paging on a silenced check or not.
In this hack, timeout(2) will actually become timeout(10).