Yelp / elastalert

Easy & Flexible Alerting With ElasticSearch
https://elastalert.readthedocs.org
Apache License 2.0
7.97k stars 1.73k forks source link

OpsGenie: closing alerts automatically #1560

Open hugomcfonseca opened 6 years ago

hugomcfonseca commented 6 years ago

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

ranjithruban commented 6 years ago

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.

vitalinoborges commented 1 year ago

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