# Unable to Setup Watcher in 6.2.1

**URL:** https://discuss.elastic.co/t/unable-to-setup-watcher-in-6-2-1/119879
**Category:** Elasticsearch
**Tags:** elastic-stack-alerting
**Created:** [February 14, 2018, 8:35pm UTC](https://discuss.elastic.co/t/unable-to-setup-watcher-in-6-2-1/119879 "2018-02-14T20:35:33Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![dkris1](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@dkris1](https://discuss.elastic.co/u/dkris1)
#### Post date: [February 14, 2018, 8:35pm UTC](https://discuss.elastic.co/t/unable-to-setup-watcher-in-6-2-1/119879/1 "2018-02-14T20:35:33Z")

</div>

Hi all,

I have upgraded ELK from 6.0 to 6.2.1 and im trying to setup my first watcher. How ever it fails. following is the error.

"{  
"error": {  
"root\_cause": [  
{  
"type": "illegal\_argument\_exception",  
"reason": "Rejecting mapping update to [.watches] as the final mapping would have more than 1 type: [watch, doc]"  
}  
],  
"type": "illegal\_argument\_exception",  
"reason": "Rejecting mapping update to [.watches] as the final mapping would have more than 1 type: [watch, doc]"  
},  
"status": 400  
}"

Watcher :

PUT \_xpack/watcher/watch/log\_error\_watch  
{  
"trigger" : {  
"schedule" : { "interval" : "10s" }  
},  
"input" : {  
"search" : {  
"request" : {  
"indices" : ["filebeat-\*"],  
"body" : {  
"query" : {  
"match" : { "message": "error" }  
}  
}  
}  
}  
}  
}

Am i missing anything ? New to x-pack.

---

<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: [February 14, 2018, 9:21pm UTC](https://discuss.elastic.co/t/unable-to-setup-watcher-in-6-2-1/119879/2 "2018-02-14T21:21:20Z")

</div>

hey,

have you been upgrading from 5.x by any chance or did you start with 6.0? Did you run the [migration assistance API](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/migration-api-assistance.html) and the [migration upgrade API](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/migration-api-upgrade.html)?

--Alex

---

<div class="post-metadata">

### Author: ![dkris1](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@dkris1](https://discuss.elastic.co/u/dkris1)
#### Post date: [February 14, 2018, 9:56pm UTC](https://discuss.elastic.co/t/unable-to-setup-watcher-in-6-2-1/119879/3 "2018-02-14T21:56:52Z")

</div>

Hey Alex,

I started with 6.0. But X-pack is installed and configured only after upgrading to 6.2.1.

But after installing i ran the upgrade api. It gave me following now.

GET /\_xpack/migration/assistance

output :  
{"indices": {}}

---

<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: [February 14, 2018, 10:13pm UTC](https://discuss.elastic.co/t/unable-to-setup-watcher-in-6-2-1/119879/4 "2018-02-14T22:13:53Z")

</div>

Can you share the output of (one of them should return something on 6.0)

```auto
GET _template?filter_path=**.template
GET _template?filter_path=**. index_patterns

```

I am especially interested if there is a `watches` index template. if that is the case you could try to delete that one together with the `triggered_watches` template. If you then delete your `.watches` index, you should be able to put a watch again.

--Alex

---

<div class="post-metadata">

### Author: ![dkris1](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@dkris1](https://discuss.elastic.co/u/dkris1)
#### Post date: [February 14, 2018, 10:17pm UTC](https://discuss.elastic.co/t/unable-to-setup-watcher-in-6-2-1/119879/5 "2018-02-14T22:17:19Z")

</div>

Alex, Here is the output for the

GET \_template?filter\_path=\*\*.template

output :

{  
".watch-history-6": {  
"settings": {  
"index": {  
"xpack": {  
"watcher": {  
"template": {  
"version": "6"  
}  
}  
}  
}  
}  
},  
".watch-history-7": {  
"settings": {  
"index": {  
"xpack": {  
"watcher": {  
"template": {  
"version": "7"  
}  
}  
}  
}  
}  
}  
}

---

<div class="post-metadata">

### Author: ![dkris1](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@dkris1](https://discuss.elastic.co/u/dkris1)
#### Post date: [February 14, 2018, 10:35pm UTC](https://discuss.elastic.co/t/unable-to-setup-watcher-in-6-2-1/119879/6 "2018-02-14T22:35:10Z")

</div>

I deleted the **".watch-history-6"** template as well as **triggered\_watches** template. How ever i couldn't find any **.watches** index.

So i tried again creating a watch and its still failing.

---

<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: [February 15, 2018, 7:46am UTC](https://discuss.elastic.co/t/unable-to-setup-watcher-in-6-2-1/119879/7 "2018-02-15T07:46:51Z")

</div>

Hey,

what about the watches template and the second template call I asked for?

--Alex

---

<div class="post-metadata">

### Author: ![dkris1](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@dkris1](https://discuss.elastic.co/u/dkris1)
#### Post date: [February 15, 2018, 1:49pm UTC](https://discuss.elastic.co/t/unable-to-setup-watcher-in-6-2-1/119879/8 "2018-02-15T13:49:34Z")

</div>

Thanks Alex. It worked after deleting watches template.

---

<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: [March 15, 2018, 1:49pm UTC](https://discuss.elastic.co/t/unable-to-setup-watcher-in-6-2-1/119879/9 "2018-03-15T13:49:49Z")

</div>

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