# Time based Indexes with the powers of ILM

**URL:** <https://discuss.elastic.co/t/time-based-indexes-with-the-powers-of-ilm/268038>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [March 23, 2021, 5:21am UTC](https://discuss.elastic.co/t/time-based-indexes-with-the-powers-of-ilm/268038 "2021-03-23T05:21:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alamgir\_Qazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alamgir_qazi/32/83868_2.png) [@Alamgir\_Qazi](https://discuss.elastic.co/u/Alamgir_Qazi)\
**Post date:** [March 23, 2021, 5:21am UTC](https://discuss.elastic.co/t/time-based-indexes-with-the-powers-of-ilm/268038/1 "2021-03-23T05:21:21Z")

</div>

I want to get benefits of ILM (hot, warm, cold) features + the fixed size of indexes without changing the date/time index. Is this possible ?

E.g. I have an index events-2021-03-23 and I want ILM to create a new index like events-2021-03-23-00001, events-2021-03-23-00002 when the shards are all equal at 50GB.

Why I wanna do this?

We're ingesting 1TB+ data per day. Time based index means we query only for the limited time. With long-term retentions, this is a lot of data and I think its best if it stays in time-series format.

---

<div class="post-metadata">

**Author:** ![Alamgir\_Qazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alamgir_qazi/32/83868_2.png) [@Alamgir\_Qazi](https://discuss.elastic.co/u/Alamgir_Qazi)\
**Post date:** [March 23, 2021, 6:54am UTC](https://discuss.elastic.co/t/time-based-indexes-with-the-powers-of-ilm/268038/2 "2021-03-23T06:54:40Z")

</div>

This isn't spam 🙄

---

<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:** [March 23, 2021, 9:04am UTC](https://discuss.elastic.co/t/time-based-indexes-with-the-powers-of-ilm/268038/4 "2021-03-23T09:04:49Z")

</div>

The spam catching isn't super smart, we just have to approve stuff that's a false negative.

What you are saying is how ILM works. The only time it will create an index with a new timestamp is if the policy changes.

---

<div class="post-metadata">

**Author:** ![Alamgir\_Qazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alamgir_qazi/32/83868_2.png) [@Alamgir\_Qazi](https://discuss.elastic.co/u/Alamgir_Qazi)\
**Post date:** [March 23, 2021, 4:36pm UTC](https://discuss.elastic.co/t/time-based-indexes-with-the-powers-of-ilm/268038/5 "2021-03-23T16:36:41Z")

</div>

Most ILM I've seen for now don't use time-based indexes. they are more like firewall-events-00001,firewall-events-00002 from the examples.

What I'm looking for is firewall-events-2022-03-23-00001 and so on.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 23, 2021, 4:58pm UTC](https://discuss.elastic.co/t/time-based-indexes-with-the-powers-of-ilm/268038/6 "2021-03-23T16:58:16Z")

</div>

I think you can have a date in the name but the sequence number will just increase and not reset per day.

---

<div class="post-metadata">

**Author:** ![Alamgir\_Qazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alamgir_qazi/32/83868_2.png) [@Alamgir\_Qazi](https://discuss.elastic.co/u/Alamgir_Qazi)\
**Post date:** [March 24, 2021, 5:54am UTC](https://discuss.elastic.co/t/time-based-indexes-with-the-powers-of-ilm/268038/7 "2021-03-24T05:54:29Z")

</div>

In that case, I just have 1 question

If I use ILM and store indexes as firewall-00001,firewall-00002 , will it give result in the same time If I use date range query on firewall-\* compared to specifying the indexes firewall-2021-03-23,firewall-2021-03-24 ?

---

<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:** [April 21, 2021, 5:54am UTC](https://discuss.elastic.co/t/time-based-indexes-with-the-powers-of-ilm/268038/8 "2021-04-21T05:54:49Z")

</div>

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