Yelp / sensu_handlers

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
Apache License 2.0
75 stars 31 forks source link

Fix wrong alert after #19

Closed bobtfish closed 9 years ago

bobtfish commented 9 years ago

I need to modify a test, but only to have the right status value, so I think this is fine.

Are there cases where this will cause us to send duplicate ok notifications?"

solarkennedy commented 9 years ago

number_of_failed_attempts < 1 is the core problem. We are not properly detecting this anymore because it goes "negative"

Yes, the reason for this is to suppress "OK" events. We won't get duplicates, but we'll get "OK"s when we never got the original "CRIT" (because it didn't satisfy the alert_after condition)

solarkennedy commented 9 years ago

@bobtfish I think I have this correct now.

I'm sad about the complexity, but on new sensus (.13) we must search the "history" in order to figure out how long a check has been failing. "Occurrences" is not enough, as it is now 1 on resolve events. (which is sane on sensu's part)

solarkennedy commented 9 years ago

Crap, this is simply all wrong. I don't know WTF I'm doing....