Skip to content

Instantly share code, notes, and snippets.

@ozzimpact
Last active February 6, 2020 13:56
Show Gist options
  • Save ozzimpact/849e96d48ee061f686f27ea89aad5a16 to your computer and use it in GitHub Desktop.
Save ozzimpact/849e96d48ee061f686f27ea89aad5a16 to your computer and use it in GitHub Desktop.
PUT _ilm/policy/logs_policy
{
"policy": {
"phases": {
"warm": {
"min_age": "1h",
"actions": {
"allocate": {
"number_of_replicas": 0
},
"forcemerge": {
"max_num_segments": 1
},
"shrink": {
"number_of_shards": 1
}
}
},
"cold": {
"min_age": "2d",
"actions": {
"allocate": {
"number_of_replicas": 0
},
"freeze": {}
}
},
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_size": "20gb",
"max_age": "1d"
}
}
},
"delete": {
"min_age": "7d",
"actions": {
"delete": {}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment