I'm trying to add a life cycle policy to my indices through Kibana. I created an index template and a lifecycle policy but I get this error: setting [index.lifecycle.rollover_alias] for index [jobmetrics-preprod-2022.09.01] is empty or not defined
Why is that and why do I need to configure an alias for that?
This is the metricbeat.yml ({{}} - We replace depending on the environment).
logging.level: error
cloud.id: {{ elastic.cloud.id }}
cloud.auth: {{ elastic.cloud.auth }}
fields:
class: {{ ec2InstanceClass }}
output.elasticsearch:
allow_older_versions: true
indices:
- index: "jobmetrics-{{ hostenv }}-%{+yyyy.MM.dd}"
setup.template:
name: "jobmetrics-{{ hostenv }}"
pattern: "jobmetrics-{{ hostenv }}-*"
enabled: true
settings:
index.number_of_shards: 1
setup.ilm.enabled: false
I figured it out. The problem was I didn't remove the "enable rollover" option in the policy configuration.
I didn't want a rollover policy, the lifecycle policy was enough for me but it is still searched for one.