# Trigger an action on index rollover?

**URL:** https://discuss.elastic.co/t/trigger-an-action-on-index-rollover/195066
**Category:** Elasticsearch
**Tags:** elastic-stack-alerting, ilm-index-lifecycle-management
**Created:** [August 13, 2019, 5:03pm UTC](https://discuss.elastic.co/t/trigger-an-action-on-index-rollover/195066 "2019-08-13T17:03:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ddearing](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@ddearing](https://discuss.elastic.co/u/ddearing)
#### Post date: [August 13, 2019, 5:03pm UTC](https://discuss.elastic.co/t/trigger-an-action-on-index-rollover/195066/1 "2019-08-13T17:03:32Z")

</div>

I'm trying to figure out if there is a way to trigger some external action (e.g. a Webhook) when an index rolls over. I thought this might be possible using some kind of HTTP Input with a Watcher, but am not sure what the Input would actually be. I've considered:

- checking if new indexes have been created (and somehow determine if it is a new rollover index?)
- checking an index's rollover status (did this roll over since Watcher last checked?)

But I haven't found an obvious way to do either of these things. Ideally the Watcher (or other mechanism) would be resilient to changes in the rollover policy (name patterns, time/size of rollover, etc).

Is there some way to get either of those ideas to work? Or is there some other way of achieving this?

Thanks for any help!

---

<div class="post-metadata">

### Author: ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)
#### Post date: [August 13, 2019, 8:36pm UTC](https://discuss.elastic.co/t/trigger-an-action-on-index-rollover/195066/2 "2019-08-13T20:36:44Z")

</div>

Hi Dave,

Currently there isn't a way to do that. I suppose you could write a custom watch to watch for index creation, but that would be a little clumsier.

If you think that would be something beneficial, please do [open an issue](https://github.com/elastic/elasticsearch/issues) describing your idea and the use case!

---

<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: [September 10, 2019, 8:36pm UTC](https://discuss.elastic.co/t/trigger-an-action-on-index-rollover/195066/3 "2019-09-10T20:36:46Z")

</div>

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