# Use watchers to manage indices and get watcher data into visualisations

**URL:** <https://discuss.elastic.co/t/use-watchers-to-manage-indices-and-get-watcher-data-into-visualisations/65467>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [November 9, 2016, 10:53am UTC](https://discuss.elastic.co/t/use-watchers-to-manage-indices-and-get-watcher-data-into-visualisations/65467 "2016-11-09T10:53:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![epe](https://avatars.discourse-cdn.com/v4/letter/e/bbce88/32.png) [@epe](https://discuss.elastic.co/u/epe)\
**Post date:** [November 9, 2016, 10:53am UTC](https://discuss.elastic.co/t/use-watchers-to-manage-indices-and-get-watcher-data-into-visualisations/65467/1 "2016-11-09T10:53:45Z")

</div>

Hi,

I have two questions:

1. Is it possible to use watchers to create/delete indices?

2. How could I get `result.input.payload.hits.total` into a visualisation?  
In the discovery tab it says that there is no cached mapping for that field, but refreshing the index pattern doesn't help.

---

<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:** [November 9, 2016, 11:16am UTC](https://discuss.elastic.co/t/use-watchers-to-manage-indices-and-get-watcher-data-into-visualisations/65467/2 "2016-11-09T11:16:01Z")

</div>

Hey,

1. Yes, you can use the [webhook action](https://www.elastic.co/guide/en/x-pack/5.0/actions-webhook.html) to do that.
2. This is not possible. In order to find out why, you should take a look at the watch history index template (just use `GET _template` to check it out. The `payload` field is never indexed, because it can be highly dynamic and thus cause a mapping explosion as well as cause invalid mappings (one watch has a payload that has a fieldname with a string, the other with an integer) - that's why it is disabled.

Hope this helps!

--Alex

---

<div class="post-metadata">

**Author:** ![epe](https://avatars.discourse-cdn.com/v4/letter/e/bbce88/32.png) [@epe](https://discuss.elastic.co/u/epe)\
**Post date:** [November 9, 2016, 11:30am UTC](https://discuss.elastic.co/t/use-watchers-to-manage-indices-and-get-watcher-data-into-visualisations/65467/3 "2016-11-09T11:30:23Z")

</div>

Hey Alex,

Thank you for the fast reply.  
I'll check out the webhook action.

---

<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:** [December 7, 2016, 11:30am UTC](https://discuss.elastic.co/t/use-watchers-to-manage-indices-and-get-watcher-data-into-visualisations/65467/4 "2016-12-07T11:30:53Z")

</div>

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