Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handler doesnt have a filter for "occurrences" or "refresh" #33

Open
techmjohnson opened this issue Feb 4, 2018 · 4 comments
Open

Handler doesnt have a filter for "occurrences" or "refresh" #33

techmjohnson opened this issue Feb 4, 2018 · 4 comments

Comments

@techmjohnson
Copy link

The current iteration of the handler doesn't handle the occurrences or refresh filters. Even if we pass this down through sensu to the handler, it's currently ignored.

Example check can be defined like this, but all "additional" values must be used by the handler or they're ignored:

sensu_check 'nameofcheck' do
command 'runsomescript.sh'
handlers opsgenie
interval 120
timeout 60
additional(:occurrences => 2, :refresh => 10, :ttl => 30)
standalone true
end

expected filter in the handler would be able to validate that this check has met the following requirements before notifying: failed 2 times in a row (occurrences) would run again after 10 seconds (refresh) and would kill itself after 30 seconds (ttl)

@Castaglia
Copy link
Contributor

Castaglia commented Feb 4, 2018

These behaviors can also be configured using Sensu filters, or by configuring flapping thresholds for the individual Sensu checks. These "occurrences" or "refresh" behaviors should not be specific to the OpsGenie handler, but something that is done in Sensu, for any handler.

@Evesy
Copy link
Contributor

Evesy commented Feb 4, 2018

@techmjohnson As @Castaglia says, occurrences and refresh behaviour in the more recent versions of Sensu is something that the built in occurrences filter (https://github.com/sensu-extensions/sensu-extensions-occurrences) observes by default. To get the behaviour you want you should just need to have the occurrences filter set on your handler.

If you also want the handler to be killed after a certain period you can set timeout on your handler definition.

@techmjohnson
Copy link
Author

concur, we can close this one up.

@varet80
Copy link

varet80 commented Mar 29, 2018

Even though setting the filter in my handler, this is not honnored in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants