# Elastic ILM rollover not working as expected

**URL:** https://discuss.elastic.co/t/elastic-ilm-rollover-not-working-as-expected/303012
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management
**Created:** [April 22, 2022, 10:24am UTC](https://discuss.elastic.co/t/elastic-ilm-rollover-not-working-as-expected/303012 "2022-04-22T10:24:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![alytkowski](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@alytkowski](https://discuss.elastic.co/u/alytkowski)
#### Post date: [April 22, 2022, 10:24am UTC](https://discuss.elastic.co/t/elastic-ilm-rollover-not-working-as-expected/303012/1 "2022-04-22T10:24:37Z")

</div>

Hello, I use data streams for my input data and the expected behavior of the ILM policy is to delete data which is 10 days old.  
To do this, I setup a policy that should create a new index every day and move the data to Delete phase after 10 days.  
Unfortunately this does not work as expected, new index is not created every day, the data is written to the same index which was created initially.  
Can you advise on how to change that?  
Here's my ILM policy:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/1/1140d0ec3879eba8ce259ad680b137ffbfa9b2ed.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/d/adbffd0f14d076e38c909c2f38a35a0649973c95.png)

---

<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: [April 26, 2022, 1:11am UTC](https://discuss.elastic.co/t/elastic-ilm-rollover-not-working-as-expected/303012/2 "2022-04-26T01:11:35Z")

</div>

What version of the stack are you running?

Can you use the ILM API to grab the entire policy and post it here?

---

<div class="post-metadata">

### Author: ![alytkowski](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@alytkowski](https://discuss.elastic.co/u/alytkowski)
#### Post date: [April 27, 2022, 7:45am UTC](https://discuss.elastic.co/t/elastic-ilm-rollover-not-working-as-expected/303012/3 "2022-04-27T07:45:13Z")

</div>

Turned out my indices were somehow locked for rollover. After I deleted them and they recreated themselves again, the ILM policy started to work properly, I could see new indices the next day.  
If anyone else has this problem, please check the status of your indexes.  
Cheers and happy searching!

---

<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 25, 2022, 7:45am UTC](https://discuss.elastic.co/t/elastic-ilm-rollover-not-working-as-expected/303012/4 "2022-05-25T07:45:51Z")

</div>

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