# How to configure beat to automatically rotate indices without ILM (7.9.1)

**URL:** <https://discuss.elastic.co/t/how-to-configure-beat-to-automatically-rotate-indices-without-ilm-7-9-1/257211>\
**Category:** Elasticsearch\
**Created:** [December 1, 2020, 1:51pm UTC](https://discuss.elastic.co/t/how-to-configure-beat-to-automatically-rotate-indices-without-ilm-7-9-1/257211 "2020-12-01T13:51:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![igorid70](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igorid70/32/45136_2.png) [@igorid70](https://discuss.elastic.co/u/igorid70)\
**Post date:** [December 1, 2020, 1:51pm UTC](https://discuss.elastic.co/t/how-to-configure-beat-to-automatically-rotate-indices-without-ilm-7-9-1/257211/1 "2020-12-01T13:51:55Z")

</div>

Hi  
I am trying to implement an automatic indices rollover based on their size while ILM is disabled.  
So, in beats configuration yml (e.g. metricbeat.yml) I specified the following:

setup.ilm.enabled: false  
output.elasticsearch.index: "metricbeat-000001"  
setup.template.name: "template\_metricbeat"  
setup.template.pattern: "metricbeat-\*"  
setup.template.type: "index"  
setup.template.overwrite: "false"  
setup.template.enabled: true

After starting the metricbeat, I created an alias with is\_write\_index=true for the index that was just created (metricbeat-000001). After running a rollover on the alias, a new index was created (metricbeat-000002) with is\_write\_index=true and the old index received is\_write\_index=false as expected. However, the metricbeat continued to write to metricbeat-000001 and not metricbeat-000002 . How do I make metricbeat to write to the relevant alias and not the original index? What am I missing?

---

<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:** [December 1, 2020, 10:27pm UTC](https://discuss.elastic.co/t/how-to-configure-beat-to-automatically-rotate-indices-without-ilm-7-9-1/257211/2 "2020-12-01T22:27:06Z")

</div>

Can I ask why you aren't using ILM?

---

<div class="post-metadata">

**Author:** ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Post date:** [December 1, 2020, 11:07pm UTC](https://discuss.elastic.co/t/how-to-configure-beat-to-automatically-rotate-indices-without-ilm-7-9-1/257211/3 "2020-12-01T23:07:44Z")

</div>

Use the alias name in output.elasticsearch.index.

---

<div class="post-metadata">

**Author:** ![igorid70](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igorid70/32/45136_2.png) [@igorid70](https://discuss.elastic.co/u/igorid70)\
**Post date:** [December 2, 2020, 5:49am UTC](https://discuss.elastic.co/t/how-to-configure-beat-to-automatically-rotate-indices-without-ilm-7-9-1/257211/4 "2020-12-02T05:49:03Z")

</div>

Assigning the alias name to output.elasticsearch.index was one of the first things I tried and I was quite surprised when ES created an index with the same name as the alias defined in output.elasticsearch.index. Of course I did not get what I wanted as such an index can't be rolled over at all (not matching -d+ pattern at the end of the name).

---

<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:** [December 30, 2020, 5:49am UTC](https://discuss.elastic.co/t/how-to-configure-beat-to-automatically-rotate-indices-without-ilm-7-9-1/257211/5 "2020-12-30T05:49:29Z")

</div>

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