# Getting issue using Index Lifecycle Policies (Does not point to index and it not a write index)

**URL:** <https://discuss.elastic.co/t/getting-issue-using-index-lifecycle-policies-does-not-point-to-index-and-it-not-a-write-index/237186>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [June 15, 2020, 8:39pm UTC](https://discuss.elastic.co/t/getting-issue-using-index-lifecycle-policies-does-not-point-to-index-and-it-not-a-write-index/237186 "2020-06-15T20:39:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pao\_Alcantar](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@Pao\_Alcantar](https://discuss.elastic.co/u/Pao_Alcantar)\
**Post date:** [June 15, 2020, 8:39pm UTC](https://discuss.elastic.co/t/getting-issue-using-index-lifecycle-policies-does-not-point-to-index-and-it-not-a-write-index/237186/1 "2020-06-15T20:39:02Z")

</div>

Hi all, good day! I am new on this and on the ELK tech, I'm looking for some help to understand what I'm doing wrong with my ILM Policy.

I've created the following policy:

```auto
    PUT _ilm/policy/rollover-120-days
    {
      "policy": {
        "phases": {
          "hot": {
            "min_age": "0ms",
            "actions": {
              "rollover": {
                "max_age": "120d",
                "max_size": "50gb"
              },
              "set_priority": {
                "priority": 100
              }
            }
          },
          "warm": {
            "min_age": "30d",
            "actions": {
              "set_priority": {
                "priority": 50
              }
            }
          },
          "delete": {
            "min_age": "30d",
            "actions": {
              "delete": {}
            }
          }
        }
      }
    }

```

And after creating it I've tried to apply this to an existent Index template:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/b/1bd60ea9d261ed3c18115dfdab0b3bceec6e58a5.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c47063de831600975383b79392835ac0db9730f5.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/3/1366be9daf8a77184590eba63d431eaab07f5008.png)

```auto
  {
      "index": {
        "lifecycle": {
          "name": "rollover-120-days",
          "rollover_alias": "sensu-metrics"
        },
        "number_of_replicas": "1"
      }
    }

```

However, I'm getting the following error:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/2/22ce0d6f7dbd570a7740dc42b2d3d8f597828b0c.png)

I'm not sure if I can add my ILM Policy on an existent index template or do I need to generate another? also in case I need to create one, what are the aspects I need to take care of in order to be this done?

I'll be grateful for all your help!  
Thanks a lot!

---

<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 13, 2020, 8:39pm UTC](https://discuss.elastic.co/t/getting-issue-using-index-lifecycle-policies-does-not-point-to-index-and-it-not-a-write-index/237186/2 "2020-07-13T20:39:02Z")

</div>

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