# Add life cycle policy on metricbeat indices

**URL:** <https://discuss.elastic.co/t/add-life-cycle-policy-on-metricbeat-indices/313905>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [September 7, 2022, 3:59pm UTC](https://discuss.elastic.co/t/add-life-cycle-policy-on-metricbeat-indices/313905 "2022-09-07T15:59:47Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 9, 2022, 2:29pm UTC](https://discuss.elastic.co/t/add-life-cycle-policy-on-metricbeat-indices/313905/4 "2022-09-09T14:29:49Z")

</div>

perhaps take a look at, it is for filebeat but hold true for metricbeat as well.  
In short if you have already created a template in elasticsearch set and want to set your own index name

`setup.template.enabled: false`

> [@Filebeat writing to its own index](https://discuss.elastic.co/t/filebeat-writing-to-its-own-index/310842/28):
>
> As explained in the post I linked, You have a moduled enabled in your configuration whether it is important now or not... It overrides the output settings in some cases but let's put that aside there are other issues... Also from the docs [here](https://www.elastic.co/guide/en/beats/filebeat/7.12/elasticsearch-output.html#index-option-es)... which is your key issue... When [index lifecycle management (ILM)](https://www.elastic.co/guide/en/beats/filebeat/7.12/ilm.html) is enabled, the default index is "filebeat-%{[agent.version]}-%{+yyyy.MM.dd}-%{index\_num}" , for example, "filebeat-7.12.1-2022-07-28-000001" . Custom index settings are ignored when…

---

_[View the full topic](https://discuss.elastic.co/t/add-life-cycle-policy-on-metricbeat-indices/313905)._
