# APM indices does not oblige the index pattern given in yaml if ILM is enabled

**URL:** <https://discuss.elastic.co/t/apm-indices-does-not-oblige-the-index-pattern-given-in-yaml-if-ilm-is-enabled/217154>\
**Category:** APM\
**Tags:** server\
**Created:** [January 30, 2020, 10:24am UTC](https://discuss.elastic.co/t/apm-indices-does-not-oblige-the-index-pattern-given-in-yaml-if-ilm-is-enabled/217154 "2020-01-30T10:24:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashwin\_Bharadwaj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashwin_bharadwaj/32/42567_2.png) [@Ashwin\_Bharadwaj](https://discuss.elastic.co/u/Ashwin_Bharadwaj)\
**Post date:** [January 30, 2020, 10:24am UTC](https://discuss.elastic.co/t/apm-indices-does-not-oblige-the-index-pattern-given-in-yaml-if-ilm-is-enabled/217154/1 "2020-01-30T10:24:48Z")

</div>

I am facing a strange issue with index naming pattern of apm. If i keep ILM enabled, the name will be apm-7.4.2-XXX-000001. However i have the default date pattern set in the server yaml.

If i disable ILM, the index names are as expected "apm-7.4.2-XXX-2020.01.30.

Is there any config / setting which is overriding the default index naming pattern.

Elasticsearch Version : 7.4.0  
APM Version : 7.4.2

---

<div class="post-metadata">

**Author:** ![bmorelli25](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bmorelli25/32/38738_2.png) [@bmorelli25](https://discuss.elastic.co/u/bmorelli25)\
**Post date:** [January 30, 2020, 4:17pm UTC](https://discuss.elastic.co/t/apm-indices-does-not-oblige-the-index-pattern-given-in-yaml-if-ilm-is-enabled/217154/2 "2020-01-30T16:17:21Z")

</div>

Hi Ashwin,

This is expected, as [ILM only works with the default index settings](https://www.elastic.co/guide/en/apm/server/7.4/ilm-default.html#_ilm_enabled_auto). As stated in those docs, when `ilm.enabled` is `true`, the APM Server ignores any configured index settings.

If it's important for you to have custom named indices, you can use Elasticsearch APIs to set up [custom index lifecycle management policies](https://www.elastic.co/guide/en/apm/server/7.4/manual-ilm-setup.html). Fair warning, this process is more difficult, and certain actions will need to be preformed again each time you upgrade.

---

<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:** [February 20, 2020, 12:17pm UTC](https://discuss.elastic.co/t/apm-indices-does-not-oblige-the-index-pattern-given-in-yaml-if-ilm-is-enabled/217154/3 "2020-02-20T12:17:24Z")

</div>

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