# Watcher notifications on Slack in Docker env

**URL:** <https://discuss.elastic.co/t/watcher-notifications-on-slack-in-docker-env/232840>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting, docker\
**Created:** [May 15, 2020, 2:18pm UTC](https://discuss.elastic.co/t/watcher-notifications-on-slack-in-docker-env/232840 "2020-05-15T14:18:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maadhav/32/46127_2.png) [@maadhav](https://discuss.elastic.co/u/maadhav)\
**Post date:** [May 15, 2020, 2:18pm UTC](https://discuss.elastic.co/t/watcher-notifications-on-slack-in-docker-env/232840/1 "2020-05-15T14:18:50Z")

</div>

Hi Team

I am using Docker concept for ELK setup using v7.6.2. I want to configure slack notifications for watcher. Following is my docker-compose.yml file:

```
version: '3.1'
services:
  es01:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
    container_name: es01
    environment:
      - node.name=es01
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=es02,es03
      - cluster.initial_master_nodes=es01,es02,es03
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - xpack.security.enabled=false
      - xpack.graph.enabled=false
      - xpack.watcher.enabled=false
      - xpack.notification.slack.account.monitoring.secure_url=https://hooks.slack.com/services/A/B
      #- xpack.notification.slack.account.monitoring.message.from=watcher
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - data01:/home/abc/docker/elk/elkdata
    ports:
      - 9200:9200
    networks:
      - elastic
  es02:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
    container_name: es02
    environment:
      - node.name=es02
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=es01,es03
      - cluster.initial_master_nodes=es01,es02,es03
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - xpack.security.enabled=false
      - xpack.graph.enabled=false
      - xpack.watcher.enabled=false
      - xpack.notification.slack.account.monitoring.secure_url=https://hooks.slack.com/services/A/B/C
      #- xpack.notification.slack.account.monitoring.message.from=watcher
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - data02:/home/abc/docker/elk/elkdata
    networks:
      - elastic
  es03:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
    container_name: es03
    environment:
      - node.name=es03
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=es01,es02
      - cluster.initial_master_nodes=es01,es02,es03
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - xpack.security.enabled=false
      - xpack.graph.enabled=false
      - xpack.watcher.enabled=false
      - xpack.notification.slack.account.monitoring.url=https://hooks.slack.com/services/A/B/C
      #- xpack.notification.slack.account.monitoring.message.from=watcher
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - data03:/home/abc/docker/elk/elkdata
    networks:
      - elastic
volumes:
    data01:
        driver: local
    data02:
        driver: local
    data03:
        driver: local
networks:
  elastic:
    driver: bridge

```

When I do docker-compose up, I am getting following error:

> java.lang.IllegalArgumentException: Setting [xpack.notification.slack.account.monitoring.secure\_url] is a secure setting and must be stored inside the Elasticsearch keystore, but was found inside elasticsearch.yml  
> es01 | at org.elasticsearch.common.settings.SecureSetting.get(SecureSetting.java:88)  
> es01 | at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:565)  
> es01 | at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:477)  
> es01 | at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:448)  
> es01 | at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:419)  
> es01 | at org.elasticsearch.common.settings.SettingsModule.(SettingsModule.java:149)

Appreciate any help in this.

Regards  
Maadhav

---

<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:** [June 12, 2020, 2:18pm UTC](https://discuss.elastic.co/t/watcher-notifications-on-slack-in-docker-env/232840/2 "2020-06-12T14:18:52Z")

</div>

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