octo/collectd — pull request #14 by insom (2012-01-15 14:02:10+00:00)
Title: Persistant 'OKAY'

I submitted this before but never got a response, I've rebased it against master to submit again.

This patch adds a 'PersistOK' flag to the threshold code which means that OKAY messages are raised for the whole time that a service is in the okay state, similar to how WARNING and FAILURE will continue to be raised while a service is outside of acceptable bounds.

My use case is this: I have a message queue which I write these notifications to, and a daemon listening on the message queue which inserts the data into Nagios using passive updates. To protect against situations where this daemon fails and I am not aware of the issue, I have a staleness check set on Nagios- if I don't receive an update within 10 minutes something I wrong and it will raise itself as a warning.

With the stock behaviour it's not possible to tell the difference between monitoring not working and all services being fine as only one OKAY is sent, on the transition from WARNING or FAILURE. This patch allows for a constant trickle of OKAY data to update Nagios and stop the freshness check from running.

No default behaviour is changed, the new code path is only active is PersistOK is set to true. A documentation patch is included.