Skip to content

Instantly share code, notes, and snippets.

@weyderfs
Created October 4, 2022 12:36
Show Gist options
  • Save weyderfs/c6a02239dc5d165611c217a1232f80b5 to your computer and use it in GitHub Desktop.
Save weyderfs/c6a02239dc5d165611c217a1232f80b5 to your computer and use it in GitHub Desktop.
Elastic ILM Template Policy to delete Index
{
"policy": {
"description": "Delete index after 8D.",
"default_state": "hot",
"states": [
{
"name": "hot",
"actions": [{
"replica_count": {
"number_of_replicas": 3
}
}
],
"transitions": [
{
"state_name": "delete",
"conditions": {
"min_index_age": "8d"
}
}
]
},
{
"name": "delete",
"actions": [
{
"delete": {}
}
],
"transitions": []
}
],
"ism_template": [
{
"index_patterns": [
"my-index-foo*"
],
"priority": 0
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment