ILM policy for indices

Hi Team,

I am trying to build a ILM policy for my indices and wondering if anyone has any readymade template?
I have indices by name proapps-*
Wanted Hot Indices for 30 days
Warm 60 days
Cold - 90 days
delete 90 days

Can someone please help me?

Here’s one that goes from hot to warm to delete, using this example, you should be able to add a transistion to cold.
{
“policy_id”: “hot_ultrawarm7d_delete30d”,
“description”: “hot_ultrawarm7d_delete30d”,
“last_updated_time”: 1634132370589,
“schema_version”: 1,
“error_notification”: null,
“default_state”: “hot”,
“states”: [
{
“name”: “hot”,
“actions”: [
],
“transitions”: [
{
“state_name”: “warm”,
“conditions”: {
“min_index_age”: “7d”
}
}
]
},
{
“name”: “warm”,
“actions”: [
{
“retry”: {
“count”: 5,
“backoff”: “exponential”,
“delay”: “1h”
},
“warm_migration”: {}
}
],
“transitions”: [
{
“state_name”: “delete”,
“conditions”: {
“min_index_age”: “30d”
}
}
]
},
{
“name”: “delete”,
“actions”: [
{
“delete”: {}
}
],
“transitions”:
}
],
“ism_template”: [
{
“index_patterns”: [
“proapps-*”
],
“priority”: 0
}
]
}

1 Like