# Alert when watcher is in error state - .watcher\_history

**URL:** <https://discuss.elastic.co/t/alert-when-watcher-is-in-error-state-watcher-history/136348>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [June 18, 2018, 4:59pm UTC](https://discuss.elastic.co/t/alert-when-watcher-is-in-error-state-watcher-history/136348 "2018-06-18T16:59:37Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Piotr\_Pawlak](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@Piotr\_Pawlak](https://discuss.elastic.co/u/Piotr_Pawlak)\
**Post date:** [June 22, 2018, 3:05pm UTC](https://discuss.elastic.co/t/alert-when-watcher-is-in-error-state-watcher-history/136348/3 "2018-06-22T15:05:24Z")

</div>

Hi Alex, this is a payload from .watcher-history with the field `status.actions.my_webhook.last_execution.successful` that if `false` to trigger an action. Unfortunately currently this field is not indexed. We tried the fields rediscovery and although brought it up from ~130 to 170 fields the one I am interested has not appeared there yet. I have been thinking to create Explicit Mapping but I am still newbie to this and currently researching this option.

{  
"watch\_id": "errors\_capabilities\_HRAAAA",  
"node": "AAAAvQsmSSuieKzuOlBBBB",  
"state": "execution\_not\_needed",  
"status": {  
"state": {  
"active": true,  
"timestamp": "2018-06-19T10:59:15.845Z"  
},  
"last\_checked": "2018-06-22T09:44:42.139Z",  
"last\_met\_condition": "2018-06-19T11:01:16.589Z",  
"actions": {  
"my\_webhook": {  
"ack": {  
"timestamp": "2018-06-19T10:59:15.845Z",  
"state": "awaits\_successful\_execution"  
},  
"last\_execution": {  
"timestamp": "2018-06-19T11:01:16.589Z",  
"successful": false,  
"reason": ""  
}  
},  
"notify-slack": {  
"ack": {  
"timestamp": "2018-06-19T11:02:18.143Z",  
"state": "awaits\_successful\_execution"  
},  
"last\_execution": {  
"timestamp": "2018-06-19T11:01:16.589Z",  
"successful": true  
},  
"last\_successful\_execution": {  
"timestamp": "2018-06-19T11:01:16.589Z",  
"successful": true  
}  
}  
},  
"execution\_state": "execution\_not\_needed",  
"version": -1  
}

---

_[View the full topic](https://discuss.elastic.co/t/alert-when-watcher-is-in-error-state-watcher-history/136348)._
