# Make all current indexes use another Index Lifecycle Management policy that has a hot-delete phase?

**URL:** <https://discuss.elastic.co/t/make-all-current-indexes-use-another-index-lifecycle-management-policy-that-has-a-hot-delete-phase/273444>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [May 19, 2021, 8:53pm UTC](https://discuss.elastic.co/t/make-all-current-indexes-use-another-index-lifecycle-management-policy-that-has-a-hot-delete-phase/273444 "2021-05-19T20:53:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![riahc3](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@riahc3](https://discuss.elastic.co/u/riahc3)\
**Post date:** [May 19, 2021, 8:53pm UTC](https://discuss.elastic.co/t/make-all-current-indexes-use-another-index-lifecycle-management-policy-that-has-a-hot-delete-phase/273444/1 "2021-05-19T20:53:18Z")

</div>

Hello

Piggybacking on my previous topic, [Implement Hot-Warm-Cold-Frozen-Delete phases with only one node but multiple storage destinations?](https://discuss.elastic.co/t/implement-hot-warm-cold-frozen-delete-phases-with-only-one-node-but-multiple-storage-destinations/272901) I created a Index Lifecycle Management policy that has a hot phase, rollsover to x days and I imagine that goes into the delete phase where it is deleted.

That seems all good but reading the documentation, it seems I have a issue with my indexes and its current policy

My current indexes seem to have a "default" policy assiged so to speak where there is only a hot phase designed. I would like switch all my current indexes so, like my new indexes, they get deleted after x days.

I seem to be confused because although I know I can assign a new ILM policy to current indexes, they dont get applied until they switch phase (which will never happen in this case)

Can someone please clear it up for me?

Thanks

---

<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:** [May 20, 2021, 2:25am UTC](https://discuss.elastic.co/t/make-all-current-indexes-use-another-index-lifecycle-management-policy-that-has-a-hot-delete-phase/273444/2 "2021-05-20T02:25:53Z")

</div>

Have you followed [Manage existing indices | Elasticsearch Guide [7.12] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-with-existing-indices.html) to integrate those existing indices into your policy?

---

<div class="post-metadata">

**Author:** ![riahc3](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@riahc3](https://discuss.elastic.co/u/riahc3)\
**Post date:** [May 20, 2021, 10:09am UTC](https://discuss.elastic.co/t/make-all-current-indexes-use-another-index-lifecycle-management-policy-that-has-a-hot-delete-phase/273444/3 "2021-05-20T10:09:43Z")

</div>

That does look intresting (more so the wildcard character). Thanks.

All my indexes are named timebased (example: "winlogbeat-winsecurity-2021.05.20" ) I already have created my ILM policy that has a hot and a delete phase. I dont have a alias (as I dont understand the concept well, sorry) How can I get this work?

Thank you very much

---

<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:** [May 24, 2021, 3:43am UTC](https://discuss.elastic.co/t/make-all-current-indexes-use-another-index-lifecycle-management-policy-that-has-a-hot-delete-phase/273444/4 "2021-05-24T03:43:46Z")

</div>

If you're using the traditional time based indices, you will need to change your Beats setup to use ILM.

---

<div class="post-metadata">

**Author:** ![riahc3](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@riahc3](https://discuss.elastic.co/u/riahc3)\
**Post date:** [May 24, 2021, 11:00am UTC](https://discuss.elastic.co/t/make-all-current-indexes-use-another-index-lifecycle-management-policy-that-has-a-hot-delete-phase/273444/5 "2021-05-24T11:00:24Z")

</div>

I just noticed that I left out a very important detail.

All my logs pass thru Logstash and it gets sent to Elasticsearch. So for example, in a Logstash configuration file I have, if I set it to use my new ILM policy, it seems to work.

But the other indexes? They dont seem to have it assigned.

---

<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:** [May 26, 2021, 10:57pm UTC](https://discuss.elastic.co/t/make-all-current-indexes-use-another-index-lifecycle-management-policy-that-has-a-hot-delete-phase/273444/6 "2021-05-26T22:57:36Z")

</div>

Right, then in that case you need to make sure all your index patterns have applicable ILM patterns assigned to them in Elasticsearch.

---

<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 23, 2021, 10:58pm UTC](https://discuss.elastic.co/t/make-all-current-indexes-use-another-index-lifecycle-management-policy-that-has-a-hot-delete-phase/273444/7 "2021-06-23T22:58:07Z")

</div>

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