Configure Watcher Slack Multiple Accounts

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}}"
            }
          }
        }
      }
    }
  }

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

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