I have an existing index I've applied the 30 day default lifecycle management policy to. But it doesn't seem to be working. I've read through the documentation and I/m obviously missing something.
The index I'm attempting to add the lifecycle to was not created with a template. Could that be my problem? If so, is there a way to build a template from the index - then use this template to launch a new index and apply the lifecycle management policy to that?
I don't see a way to create a template from an index.
I don't see a way to apply a template (for ilm purposes) to an existing index.
This is how the index was created:
PUT /dfbi.log-prod
{
"settings": {
"index": {
"routing": {
"allocation": {
"include": {
"_tier_preference": "data_content"
}
}
},
"number_of_shards": "3",
"number_of_replicas": "1"
}
}
}
the alias of 'dfbi.log-prod' was set up later
_ilm\explain shows me this:
{
"indices" : {
"dfbi.log-prod-000001" : {
"index" : "dfbi.log-prod-000001",
"managed" : true,
"policy" : "30-days-default",
"lifecycle_date_millis" : 1683152809675,
"age" : "5.92d",
"phase" : "hot",
"phase_time_millis" : 1683216402487,
"action" : "rollover",
"action_time_millis" : 1683216402687,
"step" : "check-rollover-ready",
"step_time_millis" : 1683216402687,
"phase_execution" : {
"policy" : "30-days-default",
"phase_definition" : {
"min_age" : "0ms",
"actions" : {
"rollover" : {
"max_primary_shard_size" : "50gb",
"max_age" : "30d"
}
}
},
"version" : 1,
"modified_date_in_millis" : 1681853018351
}
}
}
}
Any help here is very much appreciated.