# Apply new ILM to managed index template FAILED

**URL:** <https://discuss.elastic.co/t/apply-new-ilm-to-managed-index-template-failed/325789>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management, datastreams\
**Created:** [February 17, 2023, 2:22am UTC](https://discuss.elastic.co/t/apply-new-ilm-to-managed-index-template-failed/325789 "2023-02-17T02:22:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anh\_Nguyen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anh_nguyen/32/98119_2.png) [@Anh\_Nguyen](https://discuss.elastic.co/u/Anh_Nguyen)\
**Post date:** [February 17, 2023, 2:22am UTC](https://discuss.elastic.co/t/apply-new-ilm-to-managed-index-template-failed/325789/1 "2023-02-17T02:22:17Z")

</div>

I have a time series data stream, it has a managed index template and it was configured to "logs ILM" by default. I want to use another ILM and I changed the index template configure by "Edit" in Index Management and add this:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/c/fc45613ec98193e5dae940d65e95af5a980556c1.png)

It was become right the ILM I changed after I reload the page. But in the next day, the index template and its indices which generated for new day follow the old ILM (the "logs ILM" by default). This happens for several time and I have no idea to solve it.

---

<div class="post-metadata">

**Author:** ![Anh\_Nguyen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anh_nguyen/32/98119_2.png) [@Anh\_Nguyen](https://discuss.elastic.co/u/Anh_Nguyen)\
**Post date:** [February 21, 2023, 2:54am UTC](https://discuss.elastic.co/t/apply-new-ilm-to-managed-index-template-failed/325789/2 "2023-02-21T02:54:54Z")

</div>

Some one help me pls.

---

<div class="post-metadata">

**Author:** ![hendry.lim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendry.lim/32/71328_2.png) [@hendry.lim](https://discuss.elastic.co/u/hendry.lim)\
**Post date:** [February 23, 2023, 2:15am UTC](https://discuss.elastic.co/t/apply-new-ilm-to-managed-index-template-failed/325789/3 "2023-02-23T02:15:40Z")

</div>

Did you update the index template with `@custom` suffix or `@package`?

You should update the index template with `@custom` suffix and then perform a roll over on your data stream.

---

<div class="post-metadata">

**Author:** ![Anh\_Nguyen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anh_nguyen/32/98119_2.png) [@Anh\_Nguyen](https://discuss.elastic.co/u/Anh_Nguyen)\
**Post date:** [February 27, 2023, 1:21am UTC](https://discuss.elastic.co/t/apply-new-ilm-to-managed-index-template-failed/325789/4 "2023-02-27T01:21:28Z")

</div>

Yes I edit the index template then the data stream, but after done one action in new ILM, it back to be the old ILM.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 27, 2023, 1:41am UTC](https://discuss.elastic.co/t/apply-new-ilm-to-managed-index-template-failed/325789/5 "2023-02-27T01:41:27Z")

</div>

Did you follow this documentation?

> **[Tutorial: Customize data retention policies | Fleet and Elastic Agent Guide...](https://www.elastic.co/guide/en/fleet/master/data-streams-ilm-tutorial.html)**

---

<div class="post-metadata">

**Author:** ![Anh\_Nguyen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anh_nguyen/32/98119_2.png) [@Anh\_Nguyen](https://discuss.elastic.co/u/Anh_Nguyen)\
**Post date:** [February 27, 2023, 3:57am UTC](https://discuss.elastic.co/t/apply-new-ilm-to-managed-index-template-failed/325789/6 "2023-02-27T03:57:32Z")

</div>

Yes, I have read it. But I prefer modifying and using the old index template to cloning to the new index. Is there any way?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 27, 2023, 12:40pm UTC](https://discuss.elastic.co/t/apply-new-ilm-to-managed-index-template-failed/325789/7 "2023-02-27T12:40:27Z")

</div>

For what I know, following the steps in the documentation is the only way to change the default retention policy.

---

<div class="post-metadata">

**Author:** ![Anh\_Nguyen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anh_nguyen/32/98119_2.png) [@Anh\_Nguyen](https://discuss.elastic.co/u/Anh_Nguyen)\
**Post date:** [February 28, 2023, 2:02am UTC](https://discuss.elastic.co/t/apply-new-ilm-to-managed-index-template-failed/325789/8 "2023-02-28T02:02:45Z")

</div>

Oh ok,..Is that fit with data already have and been integrating data?

---

<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:** [March 28, 2023, 2:03am UTC](https://discuss.elastic.co/t/apply-new-ilm-to-managed-index-template-failed/325789/9 "2023-03-28T02:03:07Z")

</div>

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