# Can't configure Slack Watcher action

**URL:** <https://discuss.elastic.co/t/cant-configure-slack-watcher-action/197271>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [August 29, 2019, 7:35am UTC](https://discuss.elastic.co/t/cant-configure-slack-watcher-action/197271 "2019-08-29T07:35:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rokcarl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rokcarl/32/53239_2.png) [@rokcarl](https://discuss.elastic.co/u/rokcarl)\
**Post date:** [August 29, 2019, 7:35am UTC](https://discuss.elastic.co/t/cant-configure-slack-watcher-action/197271/1 "2019-08-29T07:35:44Z")

</div>

I can't seem to configure the Slack Watcher action. I'm running the Elastic stack through Docker Swarm.

I have the Slack account config in elasticsearch.yml:

```
xpack.notification.slack:
  account:
    monitoring:
      message_defaults:
        from: Elastic Stack

```

Then I added the secure URL through the CLI:

```
docker exec -it $CONTAINER bin/elasticsearch-keystore add xpack.notification.slack.account.monitoring.secure_url

```

I verify that it's saved:

```
docker exec -it $CONTAINER bin/elasticsearch-keystore list
keystore.seed
xpack.notification.slack.account.monitoring.secure_url

```

When I try to send a sample notification to Slack using Watcher, I get the following error in the console:

```
["org.elasticsearch.common.settings.SettingsException: invalid slack [monitoring] account settings. missing required [secure_url] setting",

```

Not sure why it thinks it's missing. I also modified the elasticsearch.yml configuration by putting the secure\_url inside it, but that didn't work either.

The documentation does mention that some settings require a restart, but it's not clear if this one does need it too. The problem if it does is that "restarting" for me means creating another Docker container, so effectively running a new instance of ES.

Any help?

---

<div class="post-metadata">

**Author:** ![rokcarl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rokcarl/32/53239_2.png) [@rokcarl](https://discuss.elastic.co/u/rokcarl)\
**Post date:** [August 29, 2019, 8:03am UTC](https://discuss.elastic.co/t/cant-configure-slack-watcher-action/197271/2 "2019-08-29T08:03:02Z")

</div>

I have a slightly different problem now with setting up email, but possibly connected.

I do the same as before, properly configuring an email account through YAML + setting secure\_password on the CLI. Sending a test email notification results in a stacktrace with the following line in the middle:

```
"Caused by: javax.mail.AuthenticationFailedException: failed to connect, no password specified?",
```

---

<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:** [August 29, 2019, 10:24am UTC](https://discuss.elastic.co/t/cant-configure-slack-watcher-action/197271/3 "2019-08-29T10:24:20Z")

</div>

hey,

my docker/swarm skills are nearly zero, but I suspect that somehow an image without any configuration is used. The steps look fine

I just tried the same using docker-compose and it worked

```auto
version: '3.7'
services:
  elasticsearch:
    hostname: elasticsearch
    container_name: elasticsearch
    image: docker.elastic.co/elasticsearch/elasticsearch:7.3.1
    environment:
      - node.name=es01
      - cluster.initial_master_nodes=es01
      - cluster.name=my-meetups-cluster
      - http.host=0.0.0.0
    volumes:
      - './elasticsearch.keystore:/usr/share/elasticsearch/config/elasticsearch.keystore:ro'
    ports:
      - 9200:9200
    networks:
      - esnet

  kibana:
    image: docker.elastic.co/kibana/kibana:7.3.1
    hostname: kibana
    container_name: kibana
    ports: ['127.0.0.1:5601:5601']
    networks: ['esnet']
    depends_on: ['elasticsearch']

networks:
  esnet:

```

I created the keystore file locally and mounted it in. Called the same what you called `elasticsearch-keystore add xpack.notification.slack.account.monitoring.secure_url`

Running a sample watch showed me, that it tried to connect to the specified URL.

Maybe you spot a docker difference that I do not see... I suppose that the keystore call is somewhat temporary and does not save its state, but that is just an assumption.

---

<div class="post-metadata">

**Author:** ![rokcarl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rokcarl/32/53239_2.png) [@rokcarl](https://discuss.elastic.co/u/rokcarl)\
**Post date:** [August 30, 2019, 5:51am UTC](https://discuss.elastic.co/t/cant-configure-slack-watcher-action/197271/4 "2019-08-30T05:51:37Z")

</div>

Hey Alexander,

I've tried your code and there's no _Watcher_ section under _Management -\> Elasticsearch_, which means I can't set up a watch. Not sure how you did it on your end?

---

<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:** [September 27, 2019, 5:51am UTC](https://discuss.elastic.co/t/cant-configure-slack-watcher-action/197271/5 "2019-09-27T05:51:42Z")

</div>

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