elastalert icon indicating copy to clipboard operation
elastalert copied to clipboard

OpsGenie: closing alerts automatically

Open hugomcfonseca opened this issue 7 years ago • 2 comments

In documentation, it is referred this:

Currently the OpsGenieAlerter only creates an alert, however it could be extended to update or close existing alerts.

Is it expectable that ElastAlert starts not only creating alerts, but also closing them after some time (if alerted problem is no longer seen)? If yes, could you give some expectation date or release line for this feature?

I was seeing OpsGenie API documentation and pretty nice way to implement this without too much effort is defining an alias (that must be unique) and checking it every run_every only for rules which uses OpsGenie alert.

https://docs.opsgenie.com/docs/alert-api#section-close-alert

hugomcfonseca avatar Feb 14 '18 15:02 hugomcfonseca

I am using the patch in https://github.com/Yelp/elastalert/issues/288 with a few changes to make it work for opsgenie. auto1-oss/elastalert . yaml should have resolve_alert: true set and have opsgenie_alias same as alert name. Since #288 not so sure if i should add a pull request.

ranjithruban avatar May 08 '18 09:05 ranjithruban

@ranjithruban Good job! Did you do something similar with the ElastAlert2 version?

vitalinoborges avatar Jul 05 '23 12:07 vitalinoborges