# Apply ILM on multiple different index

**URL:** <https://discuss.elastic.co/t/apply-ilm-on-multiple-different-index/227525>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [April 10, 2020, 3:12pm UTC](https://discuss.elastic.co/t/apply-ilm-on-multiple-different-index/227525 "2020-04-10T15:12:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamfart](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@kamfart](https://discuss.elastic.co/u/kamfart)\
**Post date:** [April 10, 2020, 3:12pm UTC](https://discuss.elastic.co/t/apply-ilm-on-multiple-different-index/227525/1 "2020-04-10T15:12:24Z")

</div>

Hi everyone.

I try to figure it out something which annoying me about ILM.  
I should miss something.

Here is my understanding of Logstash and Elasticsearch philosophy :

- document, objects which will contains our data parsed by Logstash
- index, objects which will regroup documents into one accessible common name
- index template, object which will point to some index describe by a regular expression
- ilm, object which will create an index n+1 under certain conditions

For me, one of the most advantage of index template is the possibility to apply and normalyze specific contrains to different document regroup by different pattern.

For example : add one numeric field with mutate filter, into several configurations files from differents sources.  
And use template to convert it has integer instead of copy/paste X times mutate + convert filter into each files.

Here is my trouble with ILM :  
To apply an ILM to one template, you have to declare the field "index.lifecycle.rollover\_alias".  
This field can not be point by two different index. (Result : alias [my\_lovely\_alias] has more than one write index).  
Because of that, you can not apply an ILM to one entire pattern matched by your index template.

Did I misunderstood something in the documentation ?  
If I didn't, is there a way to apply the same ILM to every index ?

Best,  
Kamfart

---

<div class="post-metadata">

**Author:** ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)\
**Post date:** [April 13, 2020, 10:17pm UTC](https://discuss.elastic.co/t/apply-ilm-on-multiple-different-index/227525/2 "2020-04-13T22:17:27Z")

</div>

> [@kamfart](#):
>
> Here is my trouble with ILM :  
> To apply an ILM to one template, you have to declare the field "index.lifecycle.rollover\_alias".  
> This field can not be point by two different index. (Result : alias [my\_lovely\_alias] has more than one write index).  
> Because of that, you can not apply an ILM to one entire pattern matched by your index template.
> 
> Did I misunderstood something in the documentation ?  
> If I didn't, is there a way to apply the same ILM to every index ?

Yes this is unfortunately something that currently has to be done. We're aware of the problem though, and we're working on work that will make the bootstrapping easier to set up and reuse. [Data Streams](https://github.com/elastic/elasticsearch/issues/53100) is one of the major pieces of work in this area.

For now, you can apply the same ILM policy to every index, however, the alias management has to be done either manually or with separate templates.

---

<div class="post-metadata">

**Author:** ![kamfart](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@kamfart](https://discuss.elastic.co/u/kamfart)\
**Post date:** [April 14, 2020, 8:46am UTC](https://discuss.elastic.co/t/apply-ilm-on-multiple-different-index/227525/3 "2020-04-14T08:46:58Z")

</div>

Hi Dakrone,

thanks for your reply I've started to be crazy with this, haha.

Good luck with this issue !

Kamfart.

---

<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:** [May 12, 2020, 8:57am UTC](https://discuss.elastic.co/t/apply-ilm-on-multiple-different-index/227525/4 "2020-05-12T08:57:27Z")

</div>

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