Index Roller Policy not working


I am referring to above document to automate rollover with ILM.
I am doing it without data streams and by using an ILM index alias,
I created a lifecycle policy as named as timeseires_policy with below setting
{
"index": {
"lifecycle": {
"name": "timeseries_policy",
"rollover_alias": "timeseries"
},
"number_of_shards": "1",
"number_of_replicas": "1"
}
}
i have assigned the ILM policy to index template.

I have created a bootstrap index named timeseries-00001 with below setting
{
"index.blocks.read_only_allow_delete": "false",
"index.query.default_field": [
"*"
],
"index.refresh_interval": "1s",
"index.write.wait_for_active_shards": "1",
"index.lifecycle.name": "timeseries_policy",
"index.lifecycle.rollover_alias": "timeseries",
"index.priority": "100",
"index.number_of_replicas": "1"
}

then i created two indexes timeseries-2021.01-27 and timeeries.2021.01.28

the index rollover is not working as expected and i get the below error
Index lifecycle error

illegal_argument_exception: index.lifecycle.rollover_alias [timeseries] does not point to index [timeseries-2021.01.27]

Not sure what is missing in order to make this work. Please Help.

Hi,

can you show us the output of:

GET timeseries-2021.01-27

and

GET timeseries

and

GET timeseries-00001

and

GET _ilm/policy/timeseries_policy

and

GET _template/*

It sounds like there is a misunderstanding on the indices and alias. You need one index, for instance timeseries-0000001, which must have a write alias on it. I think you are missing the alias definition on that index? Also, I am not sure what the two other indices timeseries-2021.01-27 and timeseries.2021.01.28 should do here.

Notice that upgrading to 7.9+ allows you to use data streams, which makes this easier.

Thanks for the reply. yeah i was misunderstood about the alias name, i dont think i need those two indices timeseries-2021.01-27 and timeseries.2021.01.28
things seems to be working now, based on ILM policy the indices are getting created and executing hot/warm/cold phases.

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