# Custom filebeat index

**URL:** <https://discuss.elastic.co/t/custom-filebeat-index/274063>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 26, 2021, 1:34pm UTC](https://discuss.elastic.co/t/custom-filebeat-index/274063 "2021-05-26T13:34:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bryce\_Fernandes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bryce_fernandes/32/71166_2.png) [@Bryce\_Fernandes](https://discuss.elastic.co/u/Bryce_Fernandes)\
**Post date:** [May 26, 2021, 1:34pm UTC](https://discuss.elastic.co/t/custom-filebeat-index/274063/1 "2021-05-26T13:34:12Z")

</div>

Hi,

I want to create filebeat index based on event.module and event.dataset, i am using elasticsearch as output.

I have tried the following:

```
setup.template.name: "filebeat"
setup.template.pattern: "filebeat-*"

index: "filebeat-%{[event.module]}-%{[event.dataset]}-%{+yyyy.MM.dd}"

```

But still i am getting the index in default format.  
filebeat-7.11.1-2021-05-20

Thanks,  
Bryce Fernandes.

---

<div class="post-metadata">

**Author:** ![legoguy1000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/legoguy1000/32/54301_2.png) [@legoguy1000](https://discuss.elastic.co/u/legoguy1000)\
**Post date:** [May 27, 2021, 1:10am UTC](https://discuss.elastic.co/t/custom-filebeat-index/274063/2 "2021-05-27T01:10:39Z")

</div>

Where are you setting the `index` setting? It should be under the elasticsearch output section.

---

<div class="post-metadata">

**Author:** ![Bryce\_Fernandes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bryce_fernandes/32/71166_2.png) [@Bryce\_Fernandes](https://discuss.elastic.co/u/Bryce_Fernandes)\
**Post date:** [May 27, 2021, 4:10am UTC](https://discuss.elastic.co/t/custom-filebeat-index/274063/3 "2021-05-27T04:10:57Z")

</div>

Hi @legoguy1000 ,

index was set in elasticsearch output only, turns out I had to forcefully set ilm to false after that it started working.

Can I still use ILM for such indices?

Thanks,  
Bryce Fernandes

---

<div class="post-metadata">

**Author:** ![legoguy1000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/legoguy1000/32/54301_2.png) [@legoguy1000](https://discuss.elastic.co/u/legoguy1000)\
**Post date:** [May 27, 2021, 12:03pm UTC](https://discuss.elastic.co/t/custom-filebeat-index/274063/4 "2021-05-27T12:03:36Z")

</div>

If u want to use ILM, u won't use the index setting, you'll use the ILM settings to configure the rollover alias

---

<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 24, 2021, 2:03pm UTC](https://discuss.elastic.co/t/custom-filebeat-index/274063/5 "2021-06-24T14:03:56Z")

</div>

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