# Getting Error While creating Watcher execution!

**URL:** <https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [March 16, 2018, 6:21am UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214 "2018-03-16T06:21:54Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![naveen\_K.N](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@naveen\_K.N](https://discuss.elastic.co/u/naveen_K.N)\
**Post date:** [March 16, 2018, 6:21am UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/1 "2018-03-16T06:21:55Z")

</div>

Hi Elastic search Team,

someone please explain why im getting "No handler found for uri [/\_xpack/watcher/watch/prod-SL3b\_jvm\_memkpi/\_execute;] and method [POST]" while trying to execute watcher created ??

Thanks in advance  
Naveena

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [March 16, 2018, 5:28pm UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/2 "2018-03-16T17:28:47Z")

</div>

what version r u using ? Can you please paste your entire watch here and the logs as well ?

Thanks  
Rashmi

---

<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:** [March 16, 2018, 6:28pm UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/3 "2018-03-16T18:28:51Z")

</div>

Can you return the output of `GET /_cat/plugins`? Are you sure x-pack is installed on **all** nodes?

---

<div class="post-metadata">

**Author:** ![naveen\_K.N](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@naveen\_K.N](https://discuss.elastic.co/u/naveen_K.N)\
**Post date:** [March 19, 2018, 7:17am UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/4 "2018-03-19T07:17:13Z")

</div>

Hi @spinscale ,

the output of GET /\_cat/plugins? is :

tiebreaker-0000000000 found-elasticsearch 6.2.2  
tiebreaker-0000000000 ingest-geoip 6.2.2  
tiebreaker-0000000000 ingest-user-agent 6.2.2  
tiebreaker-0000000000 repository-s3 6.2.2  
tiebreaker-0000000000 x-pack-core 6.2.2  
tiebreaker-0000000000 x-pack-deprecation 6.2.2  
tiebreaker-0000000000 x-pack-graph 6.2.2  
tiebreaker-0000000000 x-pack-logstash 6.2.2  
tiebreaker-0000000000 x-pack-ml 6.2.2  
tiebreaker-0000000000 x-pack-monitoring 6.2.2  
tiebreaker-0000000000 x-pack-security 6.2.2  
tiebreaker-0000000000 x-pack-upgrade 6.2.2  
tiebreaker-0000000000 x-pack-watcher 6.2.2  
instance-0000000001 found-elasticsearch 6.2.2  
instance-0000000001 ingest-geoip 6.2.2  
instance-0000000001 ingest-user-agent 6.2.2  
instance-0000000001 repository-s3 6.2.2  
instance-0000000001 x-pack-core 6.2.2  
instance-0000000001 x-pack-deprecation 6.2.2  
instance-0000000001 x-pack-graph 6.2.2  
instance-0000000001 x-pack-logstash 6.2.2  
instance-0000000001 x-pack-ml 6.2.2  
instance-0000000001 x-pack-monitoring 6.2.2  
instance-0000000001 x-pack-security 6.2.2  
instance-0000000001 x-pack-upgrade 6.2.2  
instance-0000000001 x-pack-watcher 6.2.2  
instance-0000000002 found-elasticsearch 6.2.2  
instance-0000000002 ingest-geoip 6.2.2  
instance-0000000002 ingest-user-agent 6.2.2  
instance-0000000002 repository-s3 6.2.2  
instance-0000000002 x-pack-core 6.2.2  
instance-0000000002 x-pack-deprecation 6.2.2  
instance-0000000002 x-pack-graph 6.2.2  
instance-0000000002 x-pack-logstash 6.2.2  
instance-0000000002 x-pack-ml 6.2.2  
instance-0000000002 x-pack-monitoring 6.2.2  
instance-0000000002 x-pack-security 6.2.2  
instance-0000000002 x-pack-upgrade 6.2.2  
instance-0000000002 x-pack-watcher 6.2.2

---

<div class="post-metadata">

**Author:** ![naveen\_K.N](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@naveen\_K.N](https://discuss.elastic.co/u/naveen_K.N)\
**Post date:** [March 19, 2018, 7:20am UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/5 "2018-03-19T07:20:22Z")

</div>

hi @rashmi,  
we are using 6.2.2  
the watcher im trying execute is:

PUT \_xpack/watcher/watch/mwsspm\_spm\_jvm\_memkpi  
{  
"trigger": {  
"schedule": {  
"interval": "100s"  
}  
},  
"input": {  
"search": {  
"request": {  
"indices": "mws-spm",  
"types": "doc",  
"body": {  
"query": {  
"match\_all": {}  
},  
"sort":[  
{  
"monitoredComponentStats.timeStamp":{  
"order": "desc"  
}  
}  
]  
}  
}  
}  
},  
"condition": {  
"compare":{  
"ctx.payload.hits.hits.0.\_source.monitoredComponentStats.2.runtimeState.kpi.1.value": {  
"gt": "ctx.payload.hits.hits.0.\_source.monitoredComponentStats.2.runtimeState.kpi.1.marginalValue"  
}  
}  
},  
"actions": {  
"send\_email" : {  
"email": {  
"to": "CloudManagedServiceESB@softwareag.com",  
"subject": "QA server ping status",  
"body": "server {{ctx.payload.hits.hits.0.\_source.monitoredComponentStats.2.runtimeComponentId}} is having KPI's {{ctx.payload.hits.hits.0.\_source.monitoredComponentStats.2.runtimeState.kpi.1.displayName}} with current value {{ctx.payload.hits.hits.0.\_source.monitoredComponentStats.2.runtimeState.kpi.1.value}} and marginal value is {{ctx.payload.hits.hits.0.\_source.monitoredComponentStats.2.runtimeState.kpi.1.marginalValue}}"  
}  
}  
}  
}

POST \_xpack/watcher/watch/mwsspm\_spm\_jvm\_memkpi/\_execute;

Thanks,  
Naveen

---

<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:** [March 19, 2018, 2:25pm UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/6 "2018-03-19T14:25:31Z")

</div>

can you paste (and also please format), what the response from your PUT Watch call is, please?

---

<div class="post-metadata">

**Author:** ![naveen\_K.N](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@naveen\_K.N](https://discuss.elastic.co/u/naveen_K.N)\
**Post date:** [March 20, 2018, 3:57am UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/7 "2018-03-20T03:57:07Z")

</div>

Hi @spinscale  
watcher code is below :  
PUT \_xpack/watcher/watch/umspm\_spm\_jvm\_memkpi  
{  
"trigger": {  
"schedule": {  
"interval": "100s"  
}  
},  
"input": {  
"search": {  
"request": {  
"indices": "um-spm",  
"types": "doc",  
"body": {  
"query": {  
"match\_all": {}  
},  
"sort":[  
{  
"monitoredComponentStats.timeStamp":{  
"order": "desc"  
}  
}  
]  
}  
}  
}  
},  
"condition": {  
"compare":{  
"ctx.payload.hits.hits.0.\_source.monitoredComponentStats.1.runtimeState.kpi.1.value": {  
"gt": "ctx.payload.hits.hits.0.\_source.monitoredComponentStats.1.runtimeState.kpi.1.marginalValue"  
}  
}  
},  
"actions": {  
"send\_email" : {  
"email": {  
"to": "[CloudManagedServiceESB@softwareag.com](mailto:CloudManagedServiceESB@softwareag.com)",  
"subject": "QA server ping status",  
"body": "server {{ctx.payload.hits.hits.0.\_source.monitoredComponentStats.1.runtimeComponentId}} is having KPI's {{ctx.payload.hits.hits.0.\_source.monitoredComponentStats.1.runtimeState.kpi.1.displayName}} with current value {{ctx.payload.hits.hits.0.\_source.monitoredComponentStats.1.runtimeState.kpi.1.value}} and marginal value is {{ctx.payload.hits.hits.0.\_source.monitoredComponentStats.1.runtimeState.kpi.1.marginalValue}}"  
}  
}  
}  
}

response is:

> " No handler found for uri [/\_xpack/watcher/watch/umspm\_spm\_jvm\_memkpi/\_execute;] and method [POST] "

---

<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:** [March 20, 2018, 9:55am UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/8 "2018-03-20T09:55:02Z")

</div>

Request and response URLs do not match, this is not the response from the first call. Please post the exact response, including any JSON. Thanks

---

<div class="post-metadata">

**Author:** ![naveen\_K.N](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@naveen\_K.N](https://discuss.elastic.co/u/naveen_K.N)\
**Post date:** [March 20, 2018, 9:57am UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/9 "2018-03-20T09:57:05Z")

</div>

No , in the last reply i have mentioned same watcher code as well as response for the same,

Thanks  
Naveena

---

<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:** [March 20, 2018, 3:05pm UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/10 "2018-03-20T15:05:01Z")

</div>

The URL of your request is `xpack/watcher/watch/umspm_spm_jvm_memkpi`

The URL in the response is `/_xpack/watcher/watch/umspm_spm_jvm_memkpi/_execute`

Those are different endpoints.

I doubt that those two belong together. Very much.

---

<div class="post-metadata">

**Author:** ![naveen\_K.N](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@naveen\_K.N](https://discuss.elastic.co/u/naveen_K.N)\
**Post date:** [March 21, 2018, 4:18am UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/11 "2018-03-21T04:18:32Z")

</div>

Hi @spinscale,  
But let me show u How im Executing it .pls refer image file.

Thanks,  
Naveena

 ![watcher](https://us1.discourse-cdn.com/elastic/original/3X/5/c/5c45c8a7ed336a16b4c8f1f336a21354615695f3.PNG)

---

<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:** [March 21, 2018, 5:28pm UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/12 "2018-03-21T17:28:14Z")

</div>

Please do not paste images, but snippets. These screenshots are impossible to see for visually impaired people and you could just copy paste the output of the two windows shown.

There is an semicolon at the the end, which does not belong there.

---

<div class="post-metadata">

**Author:** ![naveen\_K.N](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@naveen\_K.N](https://discuss.elastic.co/u/naveen_K.N)\
**Post date:** [March 22, 2018, 3:34am UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/13 "2018-03-22T03:34:04Z")

</div>

Hi @spinscale,

Yes the semicolon was the problem, Thanks for letting me know.

problem solved now.!!

> There is an semicolon at the the end, which does not belong there.

---

<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:** [April 19, 2018, 3:34am UTC](https://discuss.elastic.co/t/getting-error-while-creating-watcher-execution/124214/14 "2018-04-19T03:34:16Z")

</div>

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