Hi, everyone!
I successfully configured Index Lifecycle Policies: indexes are rollovered and old data are deleted. But I want to be able to manually delete indexes if needed from kibana.
The problem
When I delete all indexes, new index is created without ilm policy and alias.
When add alias to index template, index recreation starts working, but rollover does not. (See section Solution that I've tried)
My configurations:
- ELK stack v7.5.0
- Single-node cluster
- Metricbeat config:
...
setup.template.enabled: true
setup.template.overwrite: true
setup.template.json.enabled: true
setup.template.json.path: "fields.yml" # see later
setup.template.json.name: "metricbeat-stable-json-template"
setup.ilm.enabled: auto
setup.ilm.rollover_alias: "metricbeat-stable"
- Index template (fields.yml):
{
"order": 1,
"index_patterns": [
"metricbeat-stable*",
"metricbeat-stable-*"
],
"settings": {
"index": {
"lifecycle": {
"name": "metricbeat-policy",
"rollover_alias": "metricbeat-stable"
}
}
}
}
Solution that I've tried
I add alias to index template:
{
"metricbeat-stable": {}
}
And index was successfully created, but rollover stops working. The error occur:
illegal_argument_exception: Rollover alias [metricbeat-stable] can point to multiple indices, found duplicated alias [[metricbeat-stable]] in index template [metricbeat-stable]
So than I delete alias from index template and rollover starts working, but index recreation is not.