# ILM lifecycle error

**URL:** <https://discuss.elastic.co/t/ilm-lifecycle-error/307880>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [June 22, 2022, 1:05pm UTC](https://discuss.elastic.co/t/ilm-lifecycle-error/307880 "2022-06-22T13:05:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alon\_carmelly](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alon_carmelly/32/118670_2.png) [@alon\_carmelly](https://discuss.elastic.co/u/alon_carmelly)\
**Post date:** [June 22, 2022, 1:05pm UTC](https://discuss.elastic.co/t/ilm-lifecycle-error/307880/1 "2022-06-22T13:05:44Z")

</div>

So I created a lifecycle policy with an Index templates using wild card for all my tests env. : test\*  
I get an error for all the indecies.  
**Index lifecycle error**  
_illegal\_argument\_exception: setting [index.lifecycle.rollover\_alias] for index [test2-2022.13] is empty or not defined_

```auto
PUT _ilm/policy/30-days-default
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_age": "30d",
            "max_primary_shard_size": "50gb"
          }
        }
      },
      "warm": {
        "min_age": "6d",
        "actions": {
          "shrink": {
            "number_of_shards": 1
          },
          "forcemerge": {
            "max_num_segments": 1
          }
        }
      },
      "cold": {
        "min_age": "40d",
        "actions": {
          "set_priority": {
            "priority": 0
          }
        }
      },
      "delete": {
        "min_age": "40d",
        "actions": {
          "delete": {
            "delete_searchable_snapshot": true
          }
        }
      }
    },
    "_meta": {
      "managed": true,
      "description": "built-in ILM policy using the hot and warm phases with a retention of 30 days"
    }
  }
}

```

I fail to grasp the concept of rollover\_alias.  
What happens to the index "test2-2022.13" once it goes into another phase? Does it get a new name which i need to define in the rollover? if so, can I keep the original index name just add a number at the end?

Also how do I create a rollover\_alias... couldn't figure that one out...

Thanks,

---

<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 27, 2022, 1:29am UTC](https://discuss.elastic.co/t/ilm-lifecycle-error/307880/2 "2022-06-27T01:29:48Z")

</div>

Check out [Troubleshooting index lifecycle management errors | Elasticsearch Guide [8.2] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.2/index-lifecycle-error-handling.html#_setting_index_lifecycle_rollover_alias_for_index_y_is_empty_or_not_defined) for that one.

---

<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 25, 2022, 1:30am UTC](https://discuss.elastic.co/t/ilm-lifecycle-error/307880/3 "2022-07-25T01:30:26Z")

</div>

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