Alerting slack


(Tommy Cabrelli) #1

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

(Søren Louv Jansen) #2

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.

(Tommy Cabrelli) #3

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

(Søren Louv Jansen) #4

Apologies for the confusion. You need a Gold license to use Watcher:

(Tommy Cabrelli) #5

Thanks for your answer sqren.

(system) closed #6

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