Skip to content

Instantly share code, notes, and snippets.

@Nurlan199206
Created September 25, 2025 05:46
Show Gist options
  • Save Nurlan199206/34a0521c82d77ae08c5a5321b638c33b to your computer and use it in GitHub Desktop.
Save Nurlan199206/34a0521c82d77ae08c5a5321b638c33b to your computer and use it in GitHub Desktop.
ilm policy
PUT /_ilm/policy/clear
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_size": "50gb",
"max_age": "5d"
},
"set_priority": {
"priority": 100
}
}
},
"warm": {
"min_age": "5d",
"actions": {
"allocate": {
"number_of_replicas": 0,
"include": {
"_name": "Node-3"
},
"exclude": {},
"require": {}
},
"forcemerge": {
"max_num_segments": 1
},
"set_priority": {
"priority": 50
},
"shrink": {
"number_of_shards": 1
}
}
},
"cold": {
"min_age": "8d",
"actions": {
"allocate": {
"number_of_replicas": 0,
"include": {},
"exclude": {
"_name": "Node-1,Node-2"
},
"require": {
"data": "cold"
}
},
"freeze": {},
"set_priority": {
"priority": 30
}
}
},
"delete": {
"min_age": "120d",
"actions": {
"delete": {}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment