Search code examples
elastalert

How to send alerts in elastalert to a api exposed in our application


We have used elastalert to monitor logs in elasticsearch. If I configure email I get the mail and everything is working as expected.

Now the ask is to send the alerts to an API that is exposed in our application. So that this API will get the alert and work on it..

As far as I searched the alert can be sent to email,slack,MS teams etc but how to send it to some URL.

Any help on this will be really appreciated

Thanks in advance


Solution

  • Read this part in the doc :

    HTTP POST here : https://elastalert.readthedocs.io/en/latest/ruletypes.html

    This alert type will send results to a JSON endpoint using HTTP POST. The key names are configurable so this is compatible with almost any endpoint. By default, the JSON will contain all the items from the match, unless you specify http_post_payload, in which case it will only contain those items. ...