ILM lifecycle error

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

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,

Check out Troubleshooting index lifecycle management errors | Elasticsearch Guide [8.2] | Elastic for that one.

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