# Index Policy not taking effect on the specified indexes

**URL:** <https://discuss.elastic.co/t/index-policy-not-taking-effect-on-the-specified-indexes/307796>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [June 21, 2022, 8:01pm UTC](https://discuss.elastic.co/t/index-policy-not-taking-effect-on-the-specified-indexes/307796 "2022-06-21T20:01:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yashwant\_Shettigar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yashwant_shettigar/32/47652_2.png) [@Yashwant\_Shettigar](https://discuss.elastic.co/u/Yashwant_Shettigar)\
**Post date:** [June 21, 2022, 8:01pm UTC](https://discuss.elastic.co/t/index-policy-not-taking-effect-on-the-specified-indexes/307796/1 "2022-06-21T20:01:29Z")

</div>

Hey Guys,

I tried applying default 90\_days\_log\_retention policy to my monitoring-es indexes, but it gets deleted after the 7th day. Not sure where it went wrong.

 ![settings1](https://us1.discourse-cdn.com/elastic/original/3X/9/b/9b459a6cc353ee52809185e62f7d4417fa2429a1.png)

# This is settings as per ILM policy for 90 days :

# { "policy": { "phases": { "hot": { "min\_age": "0ms", "actions": { "set\_priority": { "priority": 100 } } }, "warm": { "min\_age": "2d", "actions": {} }, "cold": { "min\_age": "30d", "actions": {} }, "delete": { "min\_age": "120d", "actions": { "delete": {} } } } } }

---

<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:** [June 21, 2022, 10:23pm UTC](https://discuss.elastic.co/t/index-policy-not-taking-effect-on-the-specified-indexes/307796/2 "2022-06-21T22:23:52Z")

</div>

There is the default system managed policy that might be a higher priority, try checking with an `GET _ilm/policy`.

---

<div class="post-metadata">

**Author:** ![Yashwant\_Shettigar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yashwant_shettigar/32/47652_2.png) [@Yashwant\_Shettigar](https://discuss.elastic.co/u/Yashwant_Shettigar)\
**Post date:** [June 22, 2022, 5:43am UTC](https://discuss.elastic.co/t/index-policy-not-taking-effect-on-the-specified-indexes/307796/3 "2022-06-22T05:43:38Z")

</div>

Below is the output for : GET \_ilm/policy

{  
"90\_days\_log\_retention" : {  
"version" : 6,  
"modified\_date" : "2022-06-20T07:17:39.854Z",  
"policy" : {  
"phases" : {  
"warm" : {  
"min\_age" : "2d",  
"actions" : { }  
},  
"cold" : {  
"min\_age" : "30d",  
"actions" : { }  
},  
"hot" : {  
"min\_age" : "0ms",  
"actions" : {  
"set\_priority" : {  
"priority" : 100  
}  
}  
},  
"delete" : {  
"min\_age" : "120d",  
"actions" : {  
"delete" : { }  
}  
}  
}  
}  
}  
}

=============================================================

This output is for : GET .monitoring-es-6-2022.06.16/\_ilm/explain  
{  
"indices" : {  
".monitoring-es-6-2022.06.16" : {  
"index" : ".monitoring-es-6-2022.06.16",  
"managed" : true,  
"policy" : "90\_days\_log\_retention",  
"lifecycle\_date\_millis" : 1655337604604,  
"phase" : "warm",  
"phase\_time\_millis" : 1655709459898,  
"action" : "complete",  
"action\_time\_millis" : 1655653998591,  
"step" : "complete",  
"step\_time\_millis" : 1655709459898,  
"phase\_execution" : {  
"policy" : "90\_days\_log\_retention",  
"phase\_definition" : {  
"min\_age" : "2d",  
"actions" : { }  
},  
"version" : 6,  
"modified\_date\_in\_millis" : 1655709459854  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 22, 2022, 5:52am UTC](https://discuss.elastic.co/t/index-policy-not-taking-effect-on-the-specified-indexes/307796/4 "2022-06-22T05:52:38Z")

</div>

If you look at [the subscriptions page](https://www.elastic.co/subscriptions) it states that configurable retention period requires a commercial license. I believe the free basic license is limited to 7 days retention.

---

<div class="post-metadata">

**Author:** ![Yashwant\_Shettigar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yashwant_shettigar/32/47652_2.png) [@Yashwant\_Shettigar](https://discuss.elastic.co/u/Yashwant_Shettigar)\
**Post date:** [June 22, 2022, 5:59am UTC](https://discuss.elastic.co/t/index-policy-not-taking-effect-on-the-specified-indexes/307796/5 "2022-06-22T05:59:58Z")

</div>

I have a Platinum license

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 22, 2022, 6:04am UTC](https://discuss.elastic.co/t/index-policy-not-taking-effect-on-the-specified-indexes/307796/6 "2022-06-22T06:04:09Z")

</div>

Then I would recommend contacting Support.

---

<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:** [July 20, 2022, 6:04am UTC](https://discuss.elastic.co/t/index-policy-not-taking-effect-on-the-specified-indexes/307796/7 "2022-07-20T06:04:13Z")

</div>

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