# ILM with custom index names

**URL:** https://discuss.elastic.co/t/ilm-with-custom-index-names/232570
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management
**Created:** [May 14, 2020, 7:33am UTC](https://discuss.elastic.co/t/ilm-with-custom-index-names/232570 "2020-05-14T07:33:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![michielM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michielm/32/46127_2.png) [@michielM](https://discuss.elastic.co/u/michielM)
#### Post date: [May 14, 2020, 7:33am UTC](https://discuss.elastic.co/t/ilm-with-custom-index-names/232570/1 "2020-05-14T07:33:58Z")

</div>

Hi, I have set-up my stack to use custom index names like filebeat-department-01/01/2000

To do this I had to disable ILM, but this means Elasticsearch creates daily indexes. Is it possible to have these custom index names and setup an ILM to rollover only if the file size is greater than 50Gb for example?

---

<div class="post-metadata">

### Author: ![hunsw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hunsw/32/93637_2.png) [@hunsw](https://discuss.elastic.co/u/hunsw)
#### Post date: [May 14, 2020, 11:37am UTC](https://discuss.elastic.co/t/ilm-with-custom-index-names/232570/2 "2020-05-14T11:37:35Z")

</div>

One way to solve this is to create indices for your departments, e.g. filebeat-marketing, filebeat-accounting, etc., applying ILM/rollover policies on these then creating filtered aliases for the indices, e.g.

```auto
POST /_aliases
{
    "actions" : [
        {
            "add" : {
                 "index" : "filebeat-accounting",
                 "alias" : "filebeat-accounting-01/01/2000",
                 "filter" : { ENTER_YOUR_DATE_RANGE_QUERY HERE }
            }
        }
    ]
}

```

---

<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: [May 14, 2020, 10:53pm UTC](https://discuss.elastic.co/t/ilm-with-custom-index-names/232570/3 "2020-05-14T22:53:03Z")

</div>

Why did you need to disable ILM to do this? What did/does your policy look like?

---

<div class="post-metadata">

### Author: ![michielM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michielm/32/46127_2.png) [@michielM](https://discuss.elastic.co/u/michielM)
#### Post date: [May 26, 2020, 8:02am UTC](https://discuss.elastic.co/t/ilm-with-custom-index-names/232570/4 "2020-05-26T08:02:12Z")

</div>

I needed to disable the policy to create custom index names. The previous policy just used filebeat-7.6.1-01/01/2000 and I wanted to create filebeat-department-01/01/2000, but only create a new index after the index size is greater than 50GB.

---

<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: [June 23, 2020, 8:02am UTC](https://discuss.elastic.co/t/ilm-with-custom-index-names/232570/5 "2020-06-23T08:02:19Z")

</div>

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