# Automate rollover index

**URL:** <https://discuss.elastic.co/t/automate-rollover-index/165311>\
**Category:** Elasticsearch\
**Created:** [January 22, 2019, 11:00pm UTC](https://discuss.elastic.co/t/automate-rollover-index/165311 "2019-01-22T23:00:47Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yasmeenc](https://avatars.discourse-cdn.com/v4/letter/y/a88e4f/32.png) [@Yasmeenc](https://discuss.elastic.co/u/Yasmeenc)\
**Post date:** [January 22, 2019, 11:00pm UTC](https://discuss.elastic.co/t/automate-rollover-index/165311/1 "2019-01-22T23:00:47Z")

</div>

Hi Team,

Does Elasticsearch rollover index automatically each time the rollover condition is true or it only do it once ? If once so how do I automate it, Please help

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 22, 2019, 11:05pm UTC](https://discuss.elastic.co/t/automate-rollover-index/165311/2 "2019-01-22T23:05:35Z")

</div>

It happens every time the condition is met.

---

<div class="post-metadata">

**Author:** ![Yasmeenc](https://avatars.discourse-cdn.com/v4/letter/y/a88e4f/32.png) [@Yasmeenc](https://discuss.elastic.co/u/Yasmeenc)\
**Post date:** [January 22, 2019, 11:11pm UTC](https://discuss.elastic.co/t/automate-rollover-index/165311/3 "2019-01-22T23:11:17Z")

</div>

Sorry, my bad, let me put it this way, where do I have to put the roll over index settings for it to automate every time the condition is met and also how do I generate the name of the rollover index dynamically, hope this is clear

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 22, 2019, 11:13pm UTC](https://discuss.elastic.co/t/automate-rollover-index/165311/4 "2019-01-22T23:13:29Z")

</div>

[https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-rollover-index.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-rollover-index.html) has a bit of detail on how you can set various conditions. Is there anything specifically there that we can help with?

---

<div class="post-metadata">

**Author:** ![Yasmeenc](https://avatars.discourse-cdn.com/v4/letter/y/a88e4f/32.png) [@Yasmeenc](https://discuss.elastic.co/u/Yasmeenc)\
**Post date:** [January 22, 2019, 11:54pm UTC](https://discuss.elastic.co/t/automate-rollover-index/165311/6 "2019-01-22T23:54:38Z")

</div>

I still would need help to know If I need to set up a cron job to schedule the automation of the rollover index for it to generate the index names automatically, and where do I schedule it within the ES cluster

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 23, 2019, 2:48am UTC](https://discuss.elastic.co/t/automate-rollover-index/165311/7 "2019-01-23T02:48:55Z")

</div>

If you are using the rollover API, you only need to make the request once.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 23, 2019, 2:52am UTC](https://discuss.elastic.co/t/automate-rollover-index/165311/8 "2019-01-23T02:52:36Z")

</div>

You need to call the rollover API periodically with the criteria as that is when the check is made.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 23, 2019, 2:56am UTC](https://discuss.elastic.co/t/automate-rollover-index/165311/9 "2019-01-23T02:56:01Z")

</div>

Ahh yes, I keep forgetting that part.

---

<div class="post-metadata">

**Author:** ![Yasmeenc](https://avatars.discourse-cdn.com/v4/letter/y/a88e4f/32.png) [@Yasmeenc](https://discuss.elastic.co/u/Yasmeenc)\
**Post date:** [January 23, 2019, 4:04am UTC](https://discuss.elastic.co/t/automate-rollover-index/165311/10 "2019-01-23T04:04:37Z")

</div>

I am kinda new to elasticsearch, still wondering how can I schedule the automation, do I need a cron job if so can you provide some guidance on how to set up the cron job with the automation of the rollover index

---

<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:** [February 20, 2019, 4:04am UTC](https://discuss.elastic.co/t/automate-rollover-index/165311/11 "2019-02-20T04:04:44Z")

</div>

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