# Slack action illegal\_argument

**URL:** <https://discuss.elastic.co/t/slack-action-illegal-argument/159749>\
**Category:** Elasticsearch\
**Created:** [December 6, 2018, 3:05pm UTC](https://discuss.elastic.co/t/slack-action-illegal-argument/159749 "2018-12-06T15:05:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jall](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@jall](https://discuss.elastic.co/u/jall)\
**Post date:** [December 6, 2018, 3:05pm UTC](https://discuss.elastic.co/t/slack-action-illegal-argument/159749/1 "2018-12-06T15:05:26Z")

</div>

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.

---

<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:** [December 7, 2018, 9:30am UTC](https://discuss.elastic.co/t/slack-action-illegal-argument/159749/2 "2018-12-07T09:30:09Z")

</div>

Hey,

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

--Alex

---

<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:** [January 4, 2019, 9:30am UTC](https://discuss.elastic.co/t/slack-action-illegal-argument/159749/3 "2019-01-04T09:30:13Z")

</div>

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