Slack action illegal_argument


#1

Hi,
Im having problems simulating a slack notification for an existing watcher

`[illegal_argument_exception] no account found for name: [monitoring]`

My watcher config is

{
  "trigger": {
    "schedule": {
      "interval": "5m"
    }
  },
  "input": {
    "search": {
      "request": {
        "search_type": "query_then_fetch",
        "indices": [
          "logstash-dp-timeout*"
        ],
        "types": [],
        "body": {
          "size": 0,
          "query": {
            "bool": {
              "must": [
                {
                  "query_string": {
                    "query": "backend_host:dp.popular"
                    }
                },
                {
                  "range": {
                    "@timestamp": {
                      "gte": "now-120m",
                      "lte": "now"
                    }
                  }
                }
              ]
            }
          }
        }
      }
    }
  },
  "condition": {
    "always": {}
  },
  "actions": {
    "my-logging-action": {
      "logging": {
        "level": "info",
        "text": "Se presentan  {{ctx.payload.hits.total}} timeouts"
      }
    },
    "notify-slack" : {
    	"throttle_period" : "5m",
    	"slack" : {
    		"account" : "monitoring",
    		"message" : {
    			"from" : "opbot",
    			"text" : "Se presentan  {{ctx.payload.hits.total}} timeouts",
    			"icon" : ":watcher:"
    		}
    	}
}
  }
}

elasticsearch.yml config:

xpack.notification.slack:
  account:
    monitoring:
      url: https://hooks.slack.com/services/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
      message_defaults:
        from: Watcher

Hope you can help me with this.


(Alexander Reelsen) #2

Hey,

have you configured the slack account on all of your nodes in your cluster (in each yaml file)?

--Alex