Answer the question
In order to leave comments, you need to log in
How to set up ILM correctly?
Good day! I'm trying to get ILM to work. I will say right away, I am doing it for the first time, I googled a lot, understanding did not come.
There is an index app-dev-logs-7.6.2
Index template
PUT _template/app
{
"order": 100,
"index_patterns": [
"app-dev-logs-7.6.2-*"
],
"settings": {
"index": {
"lifecycle": {
"name": "app",
"rollover_alias": "app-dev-logs-7.6.2"
}
}
},
"mappings": {
"_doc": {
"_meta": {},
"_source": {},
"properties": {}
}
}
}
PUT _ilm/policy/app
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_age": "1m",
"max_size": "50gb"
},
"set_priority": {
"priority": 100
}
}
},
"delete": {
"min_age": "1nanos",
"actions": {
"delete": {}
}
}
}
}
}
Answer the question
In order to leave comments, you need to log in
1) If the goal is not to learn how to do it through the API, but simply to create a policy, you can do it in Kibana
2) when you create a policy, what does Elastic respond to?
"delete": {
"min_age": "1nanos",
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question