# Enabling ILM after index exists / Enable ILM on first index creation with new version

**URL:** <https://discuss.elastic.co/t/enabling-ilm-after-index-exists-enable-ilm-on-first-index-creation-with-new-version/304957>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [May 17, 2022, 3:04pm UTC](https://discuss.elastic.co/t/enabling-ilm-after-index-exists-enable-ilm-on-first-index-creation-with-new-version/304957 "2022-05-17T15:04:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cotjoey](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@cotjoey](https://discuss.elastic.co/u/cotjoey)\
**Post date:** [May 17, 2022, 3:04pm UTC](https://discuss.elastic.co/t/enabling-ilm-after-index-exists-enable-ilm-on-first-index-creation-with-new-version/304957/1 "2022-05-17T15:04:26Z")

</div>

Hello,

I hope I can find help in the community forum for this issue I've been having since the beginning of using Elastic.

My problem statement is this: when I start using a new version of a beat (i.e. go from filebeat-7.16.1 to filebeat-7.17.1) it create a base index called "filebeat-7.17.1" to store the data, but does not have ILM enabled.

The only valid way I have found to enable ILM on such an index is to re-index the index with another name (i.e. filebeat-7.17.1 --\> filebeat-7.17.1-reindex), delete the original index (i.e. filebeat-7.17.1) and run the "filebeat setup" command to enable ILM. Only then I see a new index name called "filebeat-7.17.1-2022.05.17-000001" with ILM enabled on it. In order to not lose the original data, I then merge back "filebeat-7.17.1-reindex" into the new "filebeat-7.17.1-2022.05.17-000001".

I cannot endure this process anymore. I think it might be as simple as adding some lines to the beats .yml file to enable ILM on first index creation, but I have not been successful at it yet.

Basically, I am looking for two things:

1. Enable ILM on the first index on new beat version startup;
2. How to fix those indices that do not have ILM enabled.

Thank you for any help you can provide to make my life easier.

Joey

---

<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:** [June 14, 2022, 3:04pm UTC](https://discuss.elastic.co/t/enabling-ilm-after-index-exists-enable-ilm-on-first-index-creation-with-new-version/304957/2 "2022-06-14T15:04:47Z")

</div>

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