# Unable to send slack notification through x-pack on ELK 5.5 - Need Help

**URL:** https://discuss.elastic.co/t/unable-to-send-slack-notification-through-x-pack-on-elk-5-5-need-help/99670
**Category:** Elasticsearch
**Created:** [September 7, 2017, 7:06am UTC](https://discuss.elastic.co/t/unable-to-send-slack-notification-through-x-pack-on-elk-5-5-need-help/99670 "2017-09-07T07:06:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sandy007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandy007/32/21225_2.png) [@sandy007](https://discuss.elastic.co/u/sandy007)
#### Post date: [September 7, 2017, 7:06am UTC](https://discuss.elastic.co/t/unable-to-send-slack-notification-through-x-pack-on-elk-5-5-need-help/99670/1 "2017-09-07T07:06:32Z")

</div>

Hello,

I have been trying to send x-pack slack notification but keep failing - i amnot sure what wrong I am doing here ... below is my x-pack slack configuration in elasticsearch.yml file. Kindly Help me to troubleshoot and setup email slack notification.

==========================  
#Xpack  
action.auto\_create\_index: .security,.monitoring\*,.watches,.triggered\_watches,.watcher-history\*  
xpack.notification.slack.default\_account:  
url: [https://hooks.slack.com/services/dhw65jnduedu/08hbdhyj092hLhjpedko/](https://hooks.slack.com/services/dhw65jnduedu/08hbdhyj092hLhjpedko/)  
message\_defaults:  
from: watcher

watcher.actions.email.service.account:  
standard\_account:  
profile: standard  
smtp:  
host: [mta41r1.sl.emptoris.com](http://mta41r1.sl.emptoris.com)  
port: 25

"actions": {  
"email\_administrator": {  
"email": {  
"from": "admin@123.com",  
"to": "admin@123-engage.slack.com",  
"subject": "Counts of error code is {{ctx.payload.hits.total}}",  
"body": "There are total {{401 Unauthorized}} error codes found at {{ctx.execution\_time}}",  
"priority": "high"

```
}

```

}  
}  
xpack.watcher.index.rest.direct\_access: true  
http.cors.enabled: true  
http.cors.allow-origin: [http://localhost:5601](http://localhost:5601)  
xpack.watcher.execution.default\_throttle\_period: 10m  
script.engine.groovy.inline.elasticsearch-watcher-watch: on

"actions": {  
"my\_webhook": {  
"throttle\_period": "2m",  
"webhook": {  
"method": "POST",  
"host": "localhost",  
"port": 9200,  
"path": ":/{{ctx.watch\_id}",  
"body": "{{ctx.watch\_id}}:{{ctx.payload.hits.total}}"

```
}

```

}  
}

==========================

Thanks,  
Sandeep

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [September 8, 2017, 9:25am UTC](https://discuss.elastic.co/t/unable-to-send-slack-notification-through-x-pack-on-elk-5-5-need-help/99670/2 "2017-09-08T09:25:57Z")

</div>

please take the time for format your messages properly, this is is hard to read. You can use special tags to paste snippets, see this [markdown help](http://commonmark.org/help/) - I am unable to identify what is the watch in your post and what is configuration.

Also, just pasting the watch is not very helpful. Can you paste the result of such an execution of a watch, please?

Just run

```auto
POST _xpack/watcher/watch/THE_NAME_OF_YOUR_WATCH/_execute

```

and paste the output in a gist and link to that gist here.

Thanks

---

<div class="post-metadata">

### Author: ![sandy007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandy007/32/21225_2.png) [@sandy007](https://discuss.elastic.co/u/sandy007)
#### Post date: [September 22, 2017, 11:07am UTC](https://discuss.elastic.co/t/unable-to-send-slack-notification-through-x-pack-on-elk-5-5-need-help/99670/3 "2017-09-22T11:07:12Z")

</div>

Soryy for the delay in response. I will share the output and details with you soon.

Thanks,  
Sandeep

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 20, 2017, 11:07am UTC](https://discuss.elastic.co/t/unable-to-send-slack-notification-through-x-pack-on-elk-5-5-need-help/99670/4 "2017-10-20T11:07:39Z")

</div>

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