Little bit confused on min_age parameter in ilm

Greetings...!
Im currently using below ilm policy for my project. I just want to know the life span of an index. PUT _ilm/policy/hot_warm_delete
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_size": "50gb",
"max_age": "7d"
},
"set_priority": {
"priority": 50
}
}
},
"warm": {
"min_age": "7d",
"actions": {
"set_priority": {
"priority": 25
}
}
},
"delete": {
"min_age": "7d",
"actions": {
"delete": {
"delete_searchable_snapshot": true
}
}
}
}
}
}

From my ILM policy, will my index get deleted after 7 days(as mentioned in delete phase) or 21 days(7 days in hot& 7 days in warm & 7 days in Delete).
Kindly help me here.
Thanks in advance.

min_ Age usually refers to the time since the index was created,
so your index will be deleted after 7 days

Thanks a ton casterQ. That clarifies my doubt.

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

In this case, the hot phase has rollover action. So, it will be deleted 7 days after rollover. Check this reference: Tutorial: Automate rollover with ILM | Elasticsearch Guide [8.10] | Elastic

The min_age value is relative to the rollover time, not the index creation time.

1 Like

@gokulnath112 @casterQ

Correction.

Actually since the policy above hot phase indicates rollover all subsequent min_ages calculations are from the rollover date not creation date.

See here

All subsequent min_ages are calculated from the rollover date

For example, you might define a timeseries_policy that has two phases:

A hot phase that defines a rollover action to specify that an index rolls over when it reaches either a max_primary_shard_size of 50 gigabytes or a max_age of 30 days.
A delete phase that sets min_age to remove the index 90 days after rollover.
The min_age value is relative to the rollover time, not the index creation time.

So in your case say it takes 3 days to rollover in hot then min_age warm is 7days after that so a total of 10 days before warm.

Of course if you have enough volume to rollover in 1 day or less then the rest of the min_age will be the number of days plus the fraction of a day it took to rollover