# Lifecycling of rollup index

**URL:** <https://discuss.elastic.co/t/lifecycling-of-rollup-index/303167>\
**Category:** Elasticsearch\
**Tags:** rollups\
**Created:** [April 25, 2022, 1:50pm UTC](https://discuss.elastic.co/t/lifecycling-of-rollup-index/303167 "2022-04-25T13:50:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandeepmuthathi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@sandeepmuthathi](https://discuss.elastic.co/u/sandeepmuthathi)\
**Post date:** [April 25, 2022, 1:50pm UTC](https://discuss.elastic.co/t/lifecycling-of-rollup-index/303167/1 "2022-04-25T13:50:19Z")

</div>

I would want to lifecycle the rollup index. Is there any way we can do it?

---

<div class="post-metadata">

**Author:** ![grfneto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grfneto/32/125776_2.png) [@grfneto](https://discuss.elastic.co/u/grfneto)\
**Post date:** [April 25, 2022, 2:53pm UTC](https://discuss.elastic.co/t/lifecycling-of-rollup-index/303167/2 "2022-04-25T14:53:24Z")

</div>

HI @sandeepmuthathi

Welcome to the community. There is ILM documentation that can help you in this scenario.  
[ILM: Manage the index lifecycle | Elasticsearch Guide [8.1] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html)

Best regards

---

<div class="post-metadata">

**Author:** ![sandeepmuthathi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@sandeepmuthathi](https://discuss.elastic.co/u/sandeepmuthathi)\
**Post date:** [April 25, 2022, 3:13pm UTC](https://discuss.elastic.co/t/lifecycling-of-rollup-index/303167/3 "2022-04-25T15:13:36Z")

</div>

I'm not life cycling of normal index. I'm talking about life cycling of rollup index(indices created by rollup job). I don't find a way to do it. Please provide me with the steps if I can do it.

---

<div class="post-metadata">

**Author:** ![sandeepmuthathi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@sandeepmuthathi](https://discuss.elastic.co/u/sandeepmuthathi)\
**Post date:** [April 26, 2022, 4:16am UTC](https://discuss.elastic.co/t/lifecycling-of-rollup-index/303167/4 "2022-04-26T04:16:15Z")

</div>

@grfneto

---

<div class="post-metadata">

**Author:** ![grfneto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grfneto/32/125776_2.png) [@grfneto](https://discuss.elastic.co/u/grfneto)\
**Post date:** [April 28, 2022, 1:54am UTC](https://discuss.elastic.co/t/lifecycling-of-rollup-index/303167/5 "2022-04-28T01:54:38Z")

</div>

Hi @sandeepmuthathi

One way you can explore is by creating an ILM policy for your index rollups, using the index template. When you configure your template, you can put in the index patterns field the [index rollup name] you want to configure. After that just apply the ILM policy to your index rollup. Which you can configure through kibana \> Stack Management \> Index Management \> check the include rollup indices flag \> select your index rollup \> click on the edit settings tab \> add the ILM policy settings.

Here are some steps I took to test:

Step1

 ![example1](https://us1.discourse-cdn.com/elastic/original/3X/1/1/1183d1ee0c883d14467ebccf0dc8c6717f0859ed.jpeg)

Step 2

 ![example2](https://us1.discourse-cdn.com/elastic/original/3X/8/c/8c79d5c29c647b0b3dc83143589cebe6db06cb96.jpeg)

Step3

 ![example3](https://us1.discourse-cdn.com/elastic/original/3X/f/f/ffb2481e2f3d34deb546fdd0adc9b7f2a46db731.jpeg)

This link has step-by-step instructions that can also help you:  
[Tutorial: Automate rollover with ILM | Elasticsearch Guide [8.1] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-index-lifecycle-management.html)

---

<div class="post-metadata">

**Author:** ![sandeepmuthathi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@sandeepmuthathi](https://discuss.elastic.co/u/sandeepmuthathi)\
**Post date:** [April 28, 2022, 5:42am UTC](https://discuss.elastic.co/t/lifecycling-of-rollup-index/303167/6 "2022-04-28T05:42:48Z")

</div>

Thanks for your response and putting efforts to test this but did you test this rollover of rollup index is working fine? Have you verified that rollup index rolls over to new index when it hits the ILM conditions? If yes, can you put the SS of your rollup job and rollup index template so that I can also sync up.

---

<div class="post-metadata">

**Author:** ![sandeepmuthathi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@sandeepmuthathi](https://discuss.elastic.co/u/sandeepmuthathi)\
**Post date:** [April 28, 2022, 5:53am UTC](https://discuss.elastic.co/t/lifecycling-of-rollup-index/303167/7 "2022-04-28T05:53:04Z")

</div>

I'm totally confused with your suggestion. If we are applying ILM directly to the index(rollup index in our case), why we would even create an index template in the first place. Also there is a concept of setting an alias to the write index for rollover to work properly. What about that?

---

<div class="post-metadata">

**Author:** ![grfneto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grfneto/32/125776_2.png) [@grfneto](https://discuss.elastic.co/u/grfneto)\
**Post date:** [April 28, 2022, 8:14am UTC](https://discuss.elastic.co/t/lifecycling-of-rollup-index/303167/9 "2022-04-28T08:14:34Z")

</div>

I have verified that my test does not work as expected. The indexes were not created as defined in the ILM policy 😕

---

<div class="post-metadata">

**Author:** ![sandeepmuthathi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@sandeepmuthathi](https://discuss.elastic.co/u/sandeepmuthathi)\
**Post date:** [April 28, 2022, 8:38am UTC](https://discuss.elastic.co/t/lifecycling-of-rollup-index/303167/10 "2022-04-28T08:38:46Z")

</div>

> [@How to apply an ILM to a rollup index](https://discuss.elastic.co/t/how-to-apply-an-ilm-to-a-rollup-index/226849/3):
>
> Hi @Luca_Belluccini, Thanks for your response. That's a bit of a shame as it means our rollup index would end up being huge. We'll have a look into data transforms and see if we can get the same effect with those. Thanks,

---

<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:** [May 26, 2022, 8:39am UTC](https://discuss.elastic.co/t/lifecycling-of-rollup-index/303167/11 "2022-05-26T08:39:15Z")

</div>

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