# Metricbeat 7.4 index not created daily

**URL:** <https://discuss.elastic.co/t/metricbeat-7-4-index-not-created-daily/226728>\
**Category:** Beats\
**Tags:** ilm-index-lifecycle-management, metricbeat\
**Created:** [April 6, 2020, 2:12pm UTC](https://discuss.elastic.co/t/metricbeat-7-4-index-not-created-daily/226728 "2020-04-06T14:12:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kawther](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kawther/32/72397_2.png) [@Kawther](https://discuss.elastic.co/u/Kawther)\
**Post date:** [April 6, 2020, 2:12pm UTC](https://discuss.elastic.co/t/metricbeat-7-4-index-not-created-daily/226728/1 "2020-04-06T14:12:59Z")

</div>

Hello,

I upgraded metricbeat from 6 to 7.4 .  
I have this problem , I realized that the index is only created with the date you started the service

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/9/0973d8e54d397912a6010155439d7469b8d05b76.png)

I want to use the old format `<beat-type>-<hostname>-<date>`

GET \_cat/indices/_metricbeat_  
yellow open metricbeat-7.4.0-2020.04.06-000001 kCtjwDQjQRCjDl28XWIpzw 1 1 10250 0 4.4mb 4.4mb

Any idea please ?

Thank's.

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [April 6, 2020, 5:43pm UTC](https://discuss.elastic.co/t/metricbeat-7-4-index-not-created-daily/226728/2 "2020-04-06T17:43:25Z")

</div>

Hey @Kawther, welcome to discuss 🙂

This is expected, since 7.x indexes are created by index lifecycle management (ILM). ILM creates a single alias (`metricbeat-<version>`) to where metricbeat sends the data. This alias is configured to point to an index where all the data is written. ILM starts a new index when the current index is older than a month or bigger than 50GB. This is intended, to avoid having too many small indexes, but still have some .  
This behaviour is controlled by an index lifecycle policy maintained by Metricbeat, and can be configured.

You can read more about this here: [https://www.elastic.co/guide/en/beats/metricbeat/7.6/ilm.html](https://www.elastic.co/guide/en/beats/metricbeat/7.6/ilm.html)

---

<div class="post-metadata">

**Author:** ![Kawther](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kawther/32/72397_2.png) [@Kawther](https://discuss.elastic.co/u/Kawther)\
**Post date:** [April 6, 2020, 8:39pm UTC](https://discuss.elastic.co/t/metricbeat-7-4-index-not-created-daily/226728/3 "2020-04-06T20:39:01Z")

</div>

@jsoriano thank you for your answer 🙂  
I tried to update rollover for my indices with index older to 1 day .

```
GET _ilm/policy/metricbeat-7.4.0
{
  "metricbeat-7.4.0" : {
    "version" : 55,
    "modified_date" : "2020-04-06T19:03:18.028Z",
    "policy" : {
      "phases" : {
        "hot" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_size" : "1gb",
              "max_age" : "1d"
            }
          }
        }
      }
    }
  }
}

```

But index policy are not realy updated .  
So I tried with :

```
POST /metricbeat-7.4.0/_rollover/
{
  "conditions": {
    "max_age": "1d",
    "max_size": "1gb"
  }
} 

```

Response:

```
    {
      "acknowledged" : false,
      "shards_acknowledged" : false,
      "old_index" : "metricbeat-7.4.0-2020.04.06-000001",
      "new_index" : "metricbeat-7.4.0-2020.04.06-000002",
      "rolled_over" : false,
      "dry_run" : false,
      "conditions" : {
        "[max_size: 1gb]" : false,
        "[max_age: 1d]" : false
      }
    }

```

I am not able to update index policies.

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [April 7, 2020, 8:32am UTC](https://discuss.elastic.co/t/metricbeat-7-4-index-not-created-daily/226728/4 "2020-04-07T08:32:15Z")

</div>

@Kawther take a look to these docs:

- [https://www.elastic.co/guide/en/elasticsearch/reference/7.6/\_updates\_to\_executing\_policies.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/_updates_to_executing_policies.html)
- [https://www.elastic.co/guide/en/elasticsearch/reference/7.6/indices-rollover-index.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/indices-rollover-index.html)

You would need to use something like this:

```auto
PUT _ilm/policy/metricbeat-7.4.0
{
  "policy" : {
    "phases" : {
      "hot" : {
        "min_age" : "0ms",
        "actions" : {
          "rollover" : {
            "max_size" : "1gb",
            "max_age" : "1d"
          }
        }
      }
    }
  }
}

```

This wouldn't update current index, but you can manually rollover it, and the next one will have the new policy. To force a rollover:

```auto
POST metricbeat-7.4.0/_rollover

```

You can find what policies are being used by the indexes managed by `metricbeat-7.4.0` rollover alias with:

```auto
GET metricbeat-7.4.0/_ilm/explain

```

Take into account that you will need to repeat the process when you upgrade Metricbeat, because the version is included in the policy name. Since 7.6.0 ([elastic/beats#14745](https://github.com/elastic/beats/pull/14745)) the version is not included, so Metricbeat continues using custom policies if defined.

---

<div class="post-metadata">

**Author:** ![Kawther](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kawther/32/72397_2.png) [@Kawther](https://discuss.elastic.co/u/Kawther)\
**Post date:** [April 9, 2020, 11:15am UTC](https://discuss.elastic.co/t/metricbeat-7-4-index-not-created-daily/226728/5 "2020-04-09T11:15:23Z")

</div>

@jsoriano Thank you very much, you solved my problem 🥳

---

<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:** [May 7, 2020, 11:15am UTC](https://discuss.elastic.co/t/metricbeat-7-4-index-not-created-daily/226728/6 "2020-05-07T11:15:25Z")

</div>

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