# ILM - custom index name with rollover\_alias is creating new index templates

**URL:** <https://discuss.elastic.co/t/ilm-custom-index-name-with-rollover-alias-is-creating-new-index-templates/218803>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [February 11, 2020, 3:39pm UTC](https://discuss.elastic.co/t/ilm-custom-index-name-with-rollover-alias-is-creating-new-index-templates/218803 "2020-02-11T15:39:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MagicNotElastic](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@MagicNotElastic](https://discuss.elastic.co/u/MagicNotElastic)\
**Post date:** [February 11, 2020, 3:39pm UTC](https://discuss.elastic.co/t/ilm-custom-index-name-with-rollover-alias-is-creating-new-index-templates/218803/1 "2020-02-11T15:39:39Z")

</div>

In my Beats, I have settings as follow:

> ```
> setup.template.name: "metricbeat"
> setup.template.pattern: "metricbeat-*"
> 
> setup.ilm.rollover_alias: "metricbeat-%{[agent.version]}-hkhqdev"
> 
> ```

Index is created correctly as **metricbeat-7.5.2-hkhqdev-2020.02.11-000001**  
Existing Lifecycle Policy **metricbeat-7.5.2** is correctly attached to it.

But it is creating **index template** for each index **metricbeat-7.5.2-hkhqdev-** \*, while I would expect it would be using the common one, which already exists **metricbeat-7.5.2**. Why are my setup.template settings ignored.

Logs from beats:

> 2020-02-11T23:22:51.671+0800 INFO [index-management] idxmgmt/std.go:269 ILM policy successfully loaded.  
> 2020-02-11T23:22:51.672+0800 INFO [index-management] idxmgmt/std.go:408 Set setup.template.name to '{metricbeat-7.5.2-hkhqdev {now/d}-000001}' as ILM is enabled.  
> 2020-02-11T23:22:51.672+0800 INFO [index-management] idxmgmt/std.go:413 Set setup.template.pattern to 'metricbeat-7.5.2-hkhqdev-\*' as ILM is enabled.  
> 2020-02-11T23:22:51.672+0800 INFO [index-management] idxmgmt/std.go:447 Set settings.index.lifecycle.rollover\_alias in template to {metricbeat-7.5.2-hkhqdev {now/d}-000001} as ILM is enabled.  
> 2020-02-11T23:22:51.672+0800 INFO [index-management] idxmgmt/std.go:451 Set settings.index.lifecycle.name in template to {metricbeat-7.5.2 {"policy":{"phases":{"hot":{"actions":{"rollover":{"max\_age":"30d","max\_size":"50gb"}}}}}}} as ILM is enabled.  
> 2020-02-11T23:22:51.954+0800 INFO template/load.go:109 Try loading template metricbeat-7.5.2-hkhqdev to Elasticsearch  
> 2020-02-11T23:22:52.761+0800 INFO template/load.go:101 template with name 'metricbeat-7.5.2-hkhqdev' loaded.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 10, 2020, 3:39pm UTC](https://discuss.elastic.co/t/ilm-custom-index-name-with-rollover-alias-is-creating-new-index-templates/218803/2 "2020-03-10T15:39:42Z")

</div>

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