# Incorrect default index pattern for metricbeats?

**URL:** <https://discuss.elastic.co/t/incorrect-default-index-pattern-for-metricbeats/206298>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [November 3, 2019, 6:39pm UTC](https://discuss.elastic.co/t/incorrect-default-index-pattern-for-metricbeats/206298 "2019-11-03T18:39:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronin](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@Ronin](https://discuss.elastic.co/u/Ronin)\
**Post date:** [November 3, 2019, 6:39pm UTC](https://discuss.elastic.co/t/incorrect-default-index-pattern-for-metricbeats/206298/1 "2019-11-03T18:39:33Z")

</div>

We are using metricbeats 7.4.2 (also seen on 7.4.0) and with an elastic cluster that support index lifecycle management. According to metricbeats documentation, because ilm is enabled, the created index name is `metricbeat-7.4.2` instead of a daily index such as `metricbeat-7.4.2-date-0001`. However, the index pattern that is created alongside the auto generated index template is `metricbeat-7.4.0-*`, thus not matching `metricbeat-7.4.2` index and therefore the default generated ilm policy will not attach to the index. Is the auto generated template and associated matching index incorrect, or am I missing something here?

Index templates:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/2/d23b517058980d736693c5c57a272a866a03d10a.png)  
Indices:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/f/5f10af3becc847442ed61dc886fa0e1bfc1b9ca3.png)

Note: ILM settings such as on this [page](https://www.elastic.co/guide/en/beats/metricbeat/current/ilm.html) are all defaults and unchanged.

---

<div class="post-metadata">

**Author:** ![agiorgi](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@agiorgi](https://discuss.elastic.co/u/agiorgi)\
**Post date:** [November 4, 2019, 9:20am UTC](https://discuss.elastic.co/t/incorrect-default-index-pattern-for-metricbeats/206298/2 "2019-11-04T09:20:56Z")

</div>

Hi,

Happened to me too.  
Both on metricbeat 7.3.2 and 7.4.2.  
I had to delete the index and restart metricbeat to get it creating the right index.  
Still, i don't know what's causing the issue.

Alessandro

---

<div class="post-metadata">

**Author:** ![Ronin](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@Ronin](https://discuss.elastic.co/u/Ronin)\
**Post date:** [November 4, 2019, 2:29pm UTC](https://discuss.elastic.co/t/incorrect-default-index-pattern-for-metricbeats/206298/3 "2019-11-04T14:29:18Z")

</div>

One thing I have noticed is it does not seem to be consistent if it will name the index `metricbeat-7.4.2` or `metricbeat-7.4.2-date-0001`. Just been testing deleting the index and randomly it will be recreated with `metricbeat-7.4.2-date-0001`, but the majority of the time it will create `metricbeat-7.4.2`.

---

<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 2, 2019, 2:34pm UTC](https://discuss.elastic.co/t/incorrect-default-index-pattern-for-metricbeats/206298/4 "2019-12-02T14:34:04Z")

</div>

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