# Index Lifecycle Policy doesn't work

**URL:** <https://discuss.elastic.co/t/index-lifecycle-policy-doesnt-work/206357>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [November 4, 2019, 8:38am UTC](https://discuss.elastic.co/t/index-lifecycle-policy-doesnt-work/206357 "2019-11-04T08:38:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moritz\_Kiesewetter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moritz_kiesewetter/32/51243_2.png) [@Moritz\_Kiesewetter](https://discuss.elastic.co/u/Moritz_Kiesewetter)\
**Post date:** [November 4, 2019, 8:38am UTC](https://discuss.elastic.co/t/index-lifecycle-policy-doesnt-work/206357/1 "2019-11-04T08:38:43Z")

</div>

Hey Guys,  
i tought i'd like to try the Index Lifecycle Policies. But i'm pretty sure i've done something wrong, because the Index to which i assigned it is now 37GB instead of a max of 20GB.  
I Created one which looks like this

> ```
> {
> "policy": {
> "phases": {
> "hot": {
> "min_age": "0ms",
> "actions": {
> "rollover": {
> "max_size": "20gb"
> },
> "set_priority": {
> "priority": 100
> }
> }
> },
> "delete": {
> "min_age": "90d",
> "actions": {
> "delete": {}
> }
> }
> }
> }
> }
> 
> ```

I also attached it to my index template.

> {  
> "settings": {  
> "index": {  
> "lifecycle": {  
> "name": "RollOver3Months",  
> "rollover\_alias": "logstashprodal"  
> },  
> "number\_of\_shards": "3",  
> "provided\_name": "logstashprod-001",  
> "creation\_date": "",  
> "priority": "100",  
> "number\_of\_replicas": "1",  
> "uuid": "DlQVGsM5RaunnSacdmaghw",  
> "version": {  
> "created": "6080199"  
> }

Can anyone help me why this doesn't work? I'm really new to this topic.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Moritz\_Kiesewetter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moritz_kiesewetter/32/51243_2.png) [@Moritz\_Kiesewetter](https://discuss.elastic.co/u/Moritz_Kiesewetter)\
**Post date:** [November 4, 2019, 12:04pm UTC](https://discuss.elastic.co/t/index-lifecycle-policy-doesnt-work/206357/2 "2019-11-04T12:04:29Z")

</div>

If i check my ilm with GET logstashprod-001/\_ilm/explain

I get:

```
{
  "indices" : {
    "logstashprod-001" : {
      "index" : "logstashprod-001",
      "managed" : true,
      "policy" : "RollOver3Months",
      "lifecycle_date_millis" : 1571126532382,
      "phase" : "hot",
      "phase_time_millis" : 1572868546760,
      "action" : "unfollow",
      "action_time_millis" : 1572868546817,
      "step" : "wait-for-follow-shard-tasks",
      "step_time_millis" : 1572868546845,
      "phase_execution" : {
        "policy" : "RollOver3Months",
        "phase_definition" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_size" : "20gb"
            },
            "set_priority" : {
              "priority" : 100
            }
          }
        },
        "version" : 11,
        "modified_date_in_millis" : 1572860883160
      }
    }
  }
}

```

So it seams like it is actually managed by it.

---

<div class="post-metadata">

**Author:** ![Moritz\_Kiesewetter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moritz_kiesewetter/32/51243_2.png) [@Moritz\_Kiesewetter](https://discuss.elastic.co/u/Moritz_Kiesewetter)\
**Post date:** [November 7, 2019, 11:09am UTC](https://discuss.elastic.co/t/index-lifecycle-policy-doesnt-work/206357/3 "2019-11-07T11:09:53Z")

</div>

Now it 47GB , i need help guys!

---

<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:** [December 5, 2019, 11:09am UTC](https://discuss.elastic.co/t/index-lifecycle-policy-doesnt-work/206357/4 "2019-12-05T11:09:54Z")

</div>

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