# Index Life Cycle Policy Not Working on all Indexes

**URL:** <https://discuss.elastic.co/t/index-life-cycle-policy-not-working-on-all-indexes/194394>\
**Category:** Elasticsearch\
**Created:** [August 8, 2019, 10:00am UTC](https://discuss.elastic.co/t/index-life-cycle-policy-not-working-on-all-indexes/194394 "2019-08-08T10:00:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![premkumar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@premkumar](https://discuss.elastic.co/u/premkumar)\
**Post date:** [August 8, 2019, 10:00am UTC](https://discuss.elastic.co/t/index-life-cycle-policy-not-working-on-all-indexes/194394/1 "2019-08-08T10:00:22Z")

</div>

Hi Team,

I have the following ilm policy setup via logstash output filter.

output {  
if [path] == "/media/sf\_ELK/ATG01log.txt" {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
index =\> "atg"  
ilm\_rollover\_alias =\> "atg"  
ilm\_pattern =\> "000001"  
ilm\_policy =\> "10G-Maintenance"  
}  
}  
else if [path] == "/media/sf\_ELK/ATG02log.txt" {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
index =\> "test"  
ilm\_rollover\_alias =\> "test"  
ilm\_pattern =\> "000001"  
ilm\_policy =\> "10G-Maintenance"  
}  
}  
}

The below is my ilm phase definition details  
{  
"policy": "10G-Maintenance",  
"phase\_definition": {  
"min\_age": "0ms",  
"actions": {  
"rollover": {  
"max\_size": "10gb",  
"max\_age": "5d"  
},  
"set\_priority": {  
"priority": 100  
}  
}  
},  
"version": 6,  
"modified\_date\_in\_millis": 1565183203011  
}

The above policy works for only one index (atg) configured in logstash output filter and not for the other index (test). Not sure what could be the reason for rollover not working on test index.

---

<div class="post-metadata">

**Author:** ![gbrown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gbrown/32/34482_2.png) [@gbrown](https://discuss.elastic.co/u/gbrown)\
**Post date:** [August 16, 2019, 5:20pm UTC](https://discuss.elastic.co/t/index-life-cycle-policy-not-working-on-all-indexes/194394/2 "2019-08-16T17:20:04Z")

</div>

Can you post the output of the [ILM explain API](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html) here?

To explain all indices, use `GET */_ilm/explain`.

---

<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:** [September 13, 2019, 5:20pm UTC](https://discuss.elastic.co/t/index-life-cycle-policy-not-working-on-all-indexes/194394/3 "2019-09-13T17:20:05Z")

</div>

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