Index not deleting according ilm policy

I created an ILM policy and applied to system index (.monitoring-es-7-2021.06.10).
But index is not deleting after ILM time.
It is showing error.

illegal_argument_exception: setting [index.lifecycle.rollover_alias] for index [.monitoring-es-7-2021.06.10] is empty or not defined

My setting is

  "index.blocks.read_only_allow_delete": "false",
  "index.query.default_field": [
  "index.refresh_interval": "1s",
  "index.write.wait_for_active_shards": "1",
  "": "custom-monitoring-policy",
  "index.routing.allocation.include._tier_preference": "data_content",
  "index.auto_expand_replicas": "0-1",
  "index.priority": "100",
  "index.number_of_replicas": "0"

Vikram Singh

Hi Vikram
I am getting the same error and I can't figure out why. I have plenty of docs... but I can't make it right.
this link is supposed to be the right docs... but still not working.

Hi Alfredo,
I also try but problem not solved.
I searched 2 links but still facing problem. I think it will help you to figure error.

  1. I just want a simple ILM rollover policy
  2. Index lifecycle error - illegal_argument_exception: index.lifecycle.rollover_alias - #2 by rashmi

Vikram Singh

Thanks Vikram
Did you fix the issue tho?



I disable rollover option in respected ILM policy. And add "index.lifecycle.rollover_alias": "timeseries" line in index settings. And it start working. :grinning:

Hi Vikram. Did you fix that issue or is still on?

Hi alfredo,
It is fixed. working perfectly.

Hi Vikram. Thanks and I am glad that it all worked out.

Still having issue here..

What can you see wrong/need to change in the following setting? I am using helm with terraform so I'll post just the elastic part of it. "${cid}"
cloud.auth: "${cau}"
setup.ilm.enabled: false
setup.ilm.rollover_alias: "${app}" "${app}"
setup.template.pattern: "${app}-metricbeat-${env}-"
setup.dashboards.index: "${app}-metricbeat-${env}-
setup.template.settings.index.lifecycle.rollover_alias: "${app}" "${app}-policy" "${app}"
index: "${app}-metricbeat-${env}-%%{[agent.version]}-%%{+yyyy.MM.dd}"


Hi Alfredo,
I think setup.ilm.enabled: false should be true or auto.

I hope this link will help
Configure index lifecycle management | Metricbeat Reference [7.13] | Elastic

Also if I want to change the index name in a custom name?


Hi Alfredo,

you can use alias for custom name to index.

Index Aliases | Elasticsearch Guide [6.8] | Elastic

Thanks Vikram

I ve been doing some tests on this but in the end... if I have ilm.enabled auto or true I can't have a custom index cause

index: "${app}-metricbeat-${env}-%%{[agent.version]}-%%{+yyyy.MM.dd}"

is ignored and I got instead metricbeat-etcetc or a name that I creat (like myapp).

If I have ilm.enabled to FALSE I can have my template,pattern and custom index but the lifecycle doesn't work and I got errors

I can't understand why!!!

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