Alerting slack

Hello
I do use APM to logs all my nodejs errors in ES/Kibana and it works pretty well.
Is there a way to use a slack hook to notifiy for instance every errors which have status_code = 500 ?
I found a working slack logstash output here.
The problem is that if I use logstash ouput, i can't use the elasticsearch one since APM provide only 1 output.
Maybe there is a more appropriated tool ?

Thank you for your answers
regards,

Hi Tommy,

You can receive alerts on Slack by setting up a watch straight from the APM ui. Go to your service -> Click "Errors" tab -> "Integrations" button -> "Enable error reports".

You can now configure the watch to trigger for a specified interval. You cannot receive alerts in real-time but you can decrease the interval to your liking.

The created watch will not by default filter errors by status code, but you can manually edit the watch in Management -> Watcher, and adding the following to the bool filter:

{
  "term": {
    "context.response.status_code": 500
  }
}

Let me know if you have any other questions.

Hi sqren

Thank you for your answer.
That looks great ! But I can't find any "Integrations" button in my "Errors" tab :

I do have ElasticSearch 6.5.1, Kibana 6.5.1, APM Server 6.5.1

Apologies for the confusion. You need a Gold license to use Watcher: https://www.elastic.co/subscriptions.

Thanks for your answer sqren.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.