Index template and ilm conflict

I have the following in my metricbeat.yml
"template"
setup.template.enabled: true
setup.template.name: "metrics_index_template"
setup.template.pattern: "metrics-*"
setup.template.fields: "fields.yml"
setup.template.overwrite: false
"ILM"
setup.ilm.enabled: true
setup.ilm.pattern: "{now/d}-000001"
setup.ilm.policy_name: "metrics-ilm-policy"
setup.ilm.check_exists: true
setup.ilm.overwrite: false

the behavior I expect is an Index Template named "metrics_index_template" and indices named "metrics-{date}-{number}" attached to an ILM policy named "metrics-ilm-policy".
but this is not the behavior I get.

Hey @chersko,

What behaviour are you getting? Do some things work and others don't?

To change the index and aliases names you would also need to set setup.ilm.rollover_alias: metrics.

Also take into account that every time you change these settings you may need to run setup again, and you are not overwriting existing configuration (setup.ilm.overwrite: false).

the behaviour I'm getting is a index template named metricbeat-7.6.0 and indices named metricbeat-7.6.0-2020.03.03-000001

Have you tried to modify setup.ilm.rollover_alias?

yes when i modify setup.ilm.rollover_alias: "metrics", the result i get is a index template named metrics which is not what i want what i want is a index template named metrics_index_template
thanks for your help

What if you use this name for the rollover alias configuration?

setup.ilm.rollover_alias: metrics_index_template

Or with version:

setup.ilm.rollover_alias: "metrics_index_template-%{[agent.version]}"

In any case changing index and template names is complicated and error-prone, I wonder what is your use case to need this renamings.

the result when I edit my config to

setup.ilm.rollover_alias: "metrics_index_template"

is an index template named metrics_index_template and indices named metrics_index_template-{date}-{number}.
I guess once ilm is enabled index template settings has no input on the naming scheme
the reason I wanted to setup accordingly is that I have a lot of visualizations setup this way

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.