sensu/sensu — pull request #521 by shaftoe (2013-04-17 20:17:26+00:00)
Title: Add "nonzero" value in event data

To easily replicate the current logic we have in place today to deal with check "tolerance" (what we call escalate), it would be handy to have an integer value in the event data telling how many times the check status was different from 0.
At first I thought "occurrences" was meant for that, but after a while using it I realized it represents how many times the latest check status was repeated (with the exception of exit code 0).
Of course both these values could be derived (by handlers) from the history data, but, given that "occurrences" is already there, I think "nonzero" has the same right to be there too ;) They are both a derived value of history that removes the need for a custom handler logic