Sensu alert once on down check every six hours.


#1

Just wondering how easy this is, and I don’t mind if anybody can toss me the Ruby script I would need to hack up to get it working. I didn’t notice any built-in configuration parameters off the site.

I just want one alert every six hours per down service. Thanks for any help!


#2

Actually I think this sort of thing would be handle in your JSON check definition rather than the handler script. I don't have an example in front of me because I'm mobile but I recall doing something similar and it had to do with the service check interval.

···

Sent from my iPhone

On Oct 3, 2015, at 5:10 PM, John Knepper <knepperjm@gmail.com> wrote:

Just wondering how easy this is, and I don't mind if anybody can toss me the Ruby script I would need to hack up to get it working. I didn't notice any built-in configuration parameters off the site.

I just want one alert every six hours per down service. Thanks for any help!


#3

Just to clarify my original question in case it was not very informative - what I mean is something like a service goes down, but the checks continue checking the down service, but only one alert is sent. Essentially, to avoid spamming whomever is on call or pagerduty.


#4

https://sensuapp.org/docs/latest/checks#sensu-plugin-attributes

refresh: 21600

(assuming you are using standard handlers)

···

On Sat, Oct 3, 2015 at 3:48 PM, John Knepper <knepperjm@gmail.com> wrote:

Just to clarify my original question in case it was not very informative -
what I mean is something like a service goes down, but the checks continue
checking the down service, but only one alert is sent. Essentially, to
avoid spamming whomever is on call or pagerduty.