# Creating ILM

**URL:** <https://discuss.elastic.co/t/creating-ilm/246304>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [August 25, 2020, 2:35pm UTC](https://discuss.elastic.co/t/creating-ilm/246304 "2020-08-25T14:35:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [August 25, 2020, 2:35pm UTC](https://discuss.elastic.co/t/creating-ilm/246304/1 "2020-08-25T14:35:49Z")

</div>

I want to create an ILM rule that would that would apply to all indices ( I only have auditbeat-\* and filebeat-\*).

In ILM, it seems like there's no option to give it an indice, but rather [it wants index template](https://i.imgur.com/HVaPeYq.png).

How do I create an index template that would include both my indices? I only need it so I could apply ILM to both my indices. Thanks ahead!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 26, 2020, 4:33am UTC](https://discuss.elastic.co/t/creating-ilm/246304/2 "2020-08-26T04:33:44Z")

</div>

Per your [reddit thread](https://www.reddit.com/r/elasticsearch/comments/igddj7/setup_ilm/), you may want to create a single policy, and apply it to both templates.

---

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [August 26, 2020, 8:05am UTC](https://discuss.elastic.co/t/creating-ilm/246304/3 "2020-08-26T08:05:16Z")

</div>

Thanks for the response!

I don't think I have an index template for either of them. Should I just go to Stack management \> Index management \> Index template \> Create template \> Under index pattern [name it `filebeat*`](https://i.imgur.com/7rcRoHb.png) and just click next on all the optional fields? (and then do it all again with `auditbeat\*)

Thanks ahead!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 26, 2020, 9:20pm UTC](https://discuss.elastic.co/t/creating-ilm/246304/4 "2020-08-26T21:20:59Z")

</div>

Yeah that'd be the best approach.

---

<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:** [September 23, 2020, 9:21pm UTC](https://discuss.elastic.co/t/creating-ilm/246304/5 "2020-09-23T21:21:01Z")

</div>

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