# Index is not rolling

**URL:** <https://discuss.elastic.co/t/index-is-not-rolling/243602>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [August 3, 2020, 4:04pm UTC](https://discuss.elastic.co/t/index-is-not-rolling/243602 "2020-08-03T16:04:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![oicfar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oicfar/32/72064_2.png) [@oicfar](https://discuss.elastic.co/u/oicfar)\
**Post date:** [August 3, 2020, 4:04pm UTC](https://discuss.elastic.co/t/index-is-not-rolling/243602/1 "2020-08-03T16:04:18Z")

</div>

Hi,

I have the filebeat policy

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/6/666c78134fc4a055edbdd5ddbf5c5cbff2d88cde.png)

The hot phase is configured

![image](https://us1.discourse-cdn.com/elastic/original/3X/a/c/ac0436171b7a627d33817270391b453140f6cd2e.png)

and the delete phase in the pilicy is set to

![image](https://us1.discourse-cdn.com/elastic/original/3X/5/8/58a6318b1c0a92153dc41d2ca10f11903185b380.png)

But the index size is growing daily.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/3/e3257dea3220c9f7a4c5d3b5ffe65ffaf50a42ee.png)

And the status tell me

![image](https://us1.discourse-cdn.com/elastic/original/3X/1/2/12b4dd3440d4417b6371f9029999a3d170171877.png)

The policy is assigned to the index template too

![image](https://us1.discourse-cdn.com/elastic/original/3X/f/8/f8ad60b070f788a37e1ef7b15658158e9024d357.png)

Why is this so?

---

<div class="post-metadata">

**Author:** ![HenningAndersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henningandersen/32/48188_2.png) [@HenningAndersen](https://discuss.elastic.co/u/HenningAndersen)\
**Post date:** [August 4, 2020, 12:19pm UTC](https://discuss.elastic.co/t/index-is-not-rolling/243602/2 "2020-08-04T12:19:03Z")

</div>

Hi @oicfar,

based on your post, it looks like it does at least rollover every day or every second day. Can you clarify that? If you have very rapid growth, the index might grow above the size setting, but should then rollover shortly after (by default 10 minutes).

I would advice to try the [ILM explain](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/ilm-explain-lifecycle.html) API on the index to see if it contains useful information.

And double check that the setting `indices.lifecycle.poll_interval` is still set to its default of 10 minutes.

---

<div class="post-metadata">

**Author:** ![oicfar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oicfar/32/72064_2.png) [@oicfar](https://discuss.elastic.co/u/oicfar)\
**Post date:** [August 4, 2020, 1:12pm UTC](https://discuss.elastic.co/t/index-is-not-rolling/243602/3 "2020-08-04T13:12:21Z")

</div>

Correct, the index is not rolling every day. And I found, that the new policy is not set for the index. Cause:

```
curl -X GET "localhost:9200/filebeat-7.8.1-2020.07.27-000001/_ilm/explain?pretty"
{
  "indices" : {
    "filebeat-7.8.1-2020.07.27-000001" : {
      "index" : "filebeat-7.8.1-2020.07.27-000001",
      "managed" : true,
      "policy" : "filebeat",
      "lifecycle_date_millis" : 1595861869294,
      "age" : "7.92d",
      "phase" : "hot",
      "phase_time_millis" : 1595861869637,
      "action" : "rollover",
      "action_time_millis" : 1595862436410,
      "step" : "check-rollover-ready",
      "step_time_millis" : 1595862436410,
      "phase_execution" : {
        "policy" : "filebeat",
        "phase_definition" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_size" : "50gb",
              "max_age" : "30d"
            }
          }
        },
        "version" : 1,
        "modified_date_in_millis" : 1594660050819
      }
    }
  }
}

```

In the response you se the initial values. I changed them in the policy.

But when I try assign the filebeat policy again I get this.

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

Should be "Alias for rollover index" set? If yes, which name should be set?

---

<div class="post-metadata">

**Author:** ![oicfar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oicfar/32/72064_2.png) [@oicfar](https://discuss.elastic.co/u/oicfar)\
**Post date:** [August 5, 2020, 11:43am UTC](https://discuss.elastic.co/t/index-is-not-rolling/243602/4 "2020-08-05T11:43:01Z")

</div>

Hi @HenningAndersen,

today I deleted the index manually. My hope was, that the new index will get the new policy settings.

And ...

```
$ curl -X GET "localhost:9200/filebeat-7.8.1/_ilm/explain?pretty"
{
  "indices" : {
    "filebeat-7.8.1" : {
      "index" : "filebeat-7.8.1",
      "managed" : false
    }
  }
}

```

Why is this so? The policy is assigned to the index template

![image](https://us1.discourse-cdn.com/elastic/original/3X/7/7/778be8b078edfe0096b094f838ef8aafc3326f93.png)

Regards,  
Rafal

---

<div class="post-metadata">

**Author:** ![HenningAndersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henningandersen/32/48188_2.png) [@HenningAndersen](https://discuss.elastic.co/u/HenningAndersen)\
**Post date:** [August 5, 2020, 3:26pm UTC](https://discuss.elastic.co/t/index-is-not-rolling/243602/5 "2020-08-05T15:26:53Z")

</div>

Hi @oicfar,

the new index `filebeat-7.8.1` does not match the pattern (missing the `-*` part). But really to use ILM, you need `filebeat-7.8.1` to be an alias pointing to a write index. There is more information on this here:

> **[Tutorial: Automate rollover with ILM | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-index-lifecycle-management.html#ilm-gs-bootstrap)**

The bootstrap must be performed correctly for ILM to work. Work has been done to improve this in the form of a future concept called [data streams](https://github.com/elastic/elasticsearch/issues/53100).

Concerning

> Should be "Alias for rollover index" set? If yes, which name should be set?

Yes, this needs to be set, but the screenshot does not state that it is not set. You have to go to the index template to check that it has something like below in its settings:

```auto
{
  "index": {
    "lifecycle": {
      "name": "filebeat",
      "rollover_alias": "filebeat-7.8.1"
    },

```

---

<div class="post-metadata">

**Author:** ![oicfar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oicfar/32/72064_2.png) [@oicfar](https://discuss.elastic.co/u/oicfar)\
**Post date:** [August 5, 2020, 3:59pm UTC](https://discuss.elastic.co/t/index-is-not-rolling/243602/7 "2020-08-05T15:59:33Z")

</div>

Hi @HenningAndersen,

I deleted the Index and recreated it. Just to see what happens.

Current status:

```
  "settings": {
    "index": {
      "lifecycle": {
        "name": "filebeat",
        "rollover_alias": "filebeat"
      },

```

![image](https://us1.discourse-cdn.com/elastic/original/3X/5/3/53db9878d41313171e4fda802aec8a5f7aabfe4c.png)

And this looks better

![image](https://us1.discourse-cdn.com/elastic/original/3X/3/b/3bfab273434514faad577f4fb22b21e56af9b2aa.png)

![image](https://us1.discourse-cdn.com/elastic/original/3X/f/b/fb411867b11f76ceef25e19b5a961bedcc00da9c.png)

Now I have wait 2 days for rolling and 4 days for delete.

---

<div class="post-metadata">

**Author:** ![oicfar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oicfar/32/72064_2.png) [@oicfar](https://discuss.elastic.co/u/oicfar)\
**Post date:** [August 6, 2020, 11:13am UTC](https://discuss.elastic.co/t/index-is-not-rolling/243602/8 "2020-08-06T11:13:49Z")

</div>

Today it looks better when I check the ILM parameters.

```
$ curl -X GET "localhost:9200/filebeat-7.8.1-2020.08.05-000001/_ilm/explain?pretty"
{
  "indices" : {
    "filebeat-7.8.1-2020.08.05-000001" : {
      "index" : "filebeat-7.8.1-2020.08.05-000001",
      "managed" : true,
      "policy" : "filebeat",
      "lifecycle_date_millis" : 1596642651766,
      "age" : "19.34h",
      "phase" : "hot",
      "phase_time_millis" : 1596646785724,
      "action" : "rollover",
      "action_time_millis" : 1596643185906,
      "step" : "check-rollover-ready",
      "step_time_millis" : 1596646785724,
      "is_auto_retryable_error" : true,
      "failed_step_retry_count" : 3,
      "phase_execution" : {
        "policy" : "filebeat",
        "phase_definition" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_size" : "4gb",
              "max_age" : "2d"
            },
            "set_priority" : {
              "priority" : null
            }
          }
        },
        "version" : 12,
        "modified_date_in_millis" : 1596625189765
      }
    }
  }
}

```

I hope, that the rollover will work tomorrow.

---

<div class="post-metadata">

**Author:** ![oicfar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oicfar/32/72064_2.png) [@oicfar](https://discuss.elastic.co/u/oicfar)\
**Post date:** [August 25, 2020, 11:39am UTC](https://discuss.elastic.co/t/index-is-not-rolling/243602/9 "2020-08-25T11:39:28Z")

</div>

After upgrade to 7.9.0 I get some problems. Than I deleted all configs for 7.8.0 and 7.8.1 and now it's looks good.

---

<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:** [September 22, 2020, 11:39am UTC](https://discuss.elastic.co/t/index-is-not-rolling/243602/10 "2020-09-22T11:39:29Z")

</div>

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