# Configure Watcher Slack Multiple Accounts

**URL:** <https://discuss.elastic.co/t/configure-watcher-slack-multiple-accounts/175008>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [April 2, 2019, 1:36pm UTC](https://discuss.elastic.co/t/configure-watcher-slack-multiple-accounts/175008 "2019-04-02T13:36:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrePires](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@AndrePires](https://discuss.elastic.co/u/AndrePires)\
**Post date:** [April 2, 2019, 1:36pm UTC](https://discuss.elastic.co/t/configure-watcher-slack-multiple-accounts/175008/1 "2019-04-02T13:36:27Z")

</div>

I have multiple account configured in elasticsearch.yml and no matter if I define the account name kibana always sent by the first account in configuration, can someone tell me why and help me please? Thanks

Here are my configs:

```
xpack.notification.slack:
  account:
    monitoring:
      secure_url: https://hooks.slack.com/services/#####/#######
      message_defaults:
        from: AngryGorilla
        to: machinelearningteste
    uptime:
      secure_url: https://hooks.slack.com/services/TE4PZ8PPG/#####/#######
      message_defaults:
        from: AllSeeingEye
        to: uptime

```

And in the whatcher JSON:

```
  "actions": {
    "notify_slack": {
      "throttle_period_in_millis": 30000,
      "slack": {
        "account": "uptime",
        "message": {
          "from": "AllSeeingEye",
          "to": [
            "#uptime"
          ],
          "text": "AllSeeingEye saw {{ctx.payload.hits.total}} problems",
          "dynamic_attachments": {
            "list_path": "ctx.payload.hits.hits",
            "attachment_template": {
              "color": "danger",
              "title": "{{_source.http.url}} - error {{_source.http.response.status_code}}",
              "text": "*Error Message*: {{_source.error.message}} *with timestamp*: {{_source.@timestamp}}"
            }
          }
        }
      }
    }
  }
```

---

<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:** [April 3, 2019, 7:45am UTC](https://discuss.elastic.co/t/configure-watcher-slack-multiple-accounts/175008/2 "2019-04-03T07:45:06Z")

</div>

The `secure_url` cannot be configured in the YAML file, but must be configured in the keystore. Is this the case?

See [https://www.elastic.co/guide/en/elastic-stack-overview/6.6/actions-slack.html](https://www.elastic.co/guide/en/elastic-stack-overview/6.6/actions-slack.html)

---

<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:** [May 1, 2019, 7:45am UTC](https://discuss.elastic.co/t/configure-watcher-slack-multiple-accounts/175008/3 "2019-05-01T07:45:16Z")

</div>

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