# Use a dynamic index name with ILM

**URL:** <https://discuss.elastic.co/t/use-a-dynamic-index-name-with-ilm/221187>\
**Category:** Beats\
**Tags:** functionbeat\
**Created:** [February 27, 2020, 9:19am UTC](https://discuss.elastic.co/t/use-a-dynamic-index-name-with-ilm/221187 "2020-02-27T09:19:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lockhaty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lockhaty/32/54322_2.png) [@lockhaty](https://discuss.elastic.co/u/lockhaty)\
**Post date:** [February 27, 2020, 9:19am UTC](https://discuss.elastic.co/t/use-a-dynamic-index-name-with-ilm/221187/1 "2020-02-27T09:19:14Z")

</div>

I am trying to use Functionbeats for the first time and would like to know if it is possible to have the index name dynamically set based on the event payload?

I have tried:

> setup.ilm.enabled: auto  
> setup.ilm.rollover\_alias: "functionbeat-%{[my\_custom\_index]}"  
> setup.ilm.pattern: "{now/M{yyyy.MM}}-000001"

However, I get the following error:

> failed to read the ilm rollover alias: key not found

---

<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 18, 2020, 11:19pm UTC](https://discuss.elastic.co/t/use-a-dynamic-index-name-with-ilm/221187/2 "2020-03-18T23:19:20Z")

</div>

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