# INdex not rolling over correctly

**URL:** <https://discuss.elastic.co/t/index-not-rolling-over-correctly/230072>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [April 28, 2020, 3:55am UTC](https://discuss.elastic.co/t/index-not-rolling-over-correctly/230072 "2020-04-28T03:55:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![asrinivasan](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@asrinivasan](https://discuss.elastic.co/u/asrinivasan)\
**Post date:** [April 28, 2020, 3:55am UTC](https://discuss.elastic.co/t/index-not-rolling-over-correctly/230072/1 "2020-04-28T03:55:55Z")

</div>

I have a ILM policy  
template, policy, alias

```auto
{
  "prod3_template" : {
    "order" : 1,
    "index_patterns" : [
      "prod3-cloudwatch*"
    ],
    "settings" : {
      "index" : {
        "lifecycle" : {
          "name" : "prod3_policy",
          "rollover_alias" : "prod3-cloudwatch"
        },
        "number_of_shards" : "1",
        "number_of_replicas" : "1"
      }
    },
    "mappings" : { },
    "aliases" : { }
  }
}

```

policy

```auto
{
  "prod3_policy" : {
    "version" : 3,
    "modified_date" : "2020-04-19T17:32:20.186Z",
    "policy" : {
      "phases" : {
        "hot" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_size" : "50gb",
              "max_age" : "5d"
            }
          }
        },
        "delete" : {
          "min_age" : "30d",
          "actions" : {
            "delete" : { }
          }
        }
      }
    }
  }
}

```

My index is now 75G but has not rolled over

Here is the explain

```auto
{
  "indices" : {
    "prod3-cloudwatch-2020.04.18-1" : {
      "index" : "prod3-cloudwatch-2020.04.18-1",
      "managed" : true,
      "policy" : "prod3_policy",
      "lifecycle_date_millis" : 1587229446320,
      "phase" : "hot",
      "phase_time_millis" : 1587229447358,
      "action" : "rollover",
      "action_time_millis" : 1587229655594,
      "step" : "check-rollover-ready",
      "step_time_millis" : 1587229655594,
      "phase_execution" : {
        "policy" : "prod3_policy",
        "phase_definition" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_size" : "50gb"
            }
          }
        },
        "version" : 2,
        "modified_date_in_millis" : 1587229330842
      }
    }
  }
}

```

Can u please help as to why its not rolling over

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 28, 2020, 5:10am UTC](https://discuss.elastic.co/t/index-not-rolling-over-correctly/230072/2 "2020-04-28T05:10:08Z")

</div>

Rollover is based on the size of the primary shards and as you have a replica you probably have not reached the limit yet.

---

<div class="post-metadata">

**Author:** ![asrinivasan](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@asrinivasan](https://discuss.elastic.co/u/asrinivasan)\
**Post date:** [April 28, 2020, 3:52pm UTC](https://discuss.elastic.co/t/index-not-rolling-over-correctly/230072/3 "2020-04-28T15:52:51Z")

</div>

Hi Christian  
Not sure what does that mean, isnt replica replicates the shards, if the index size is 75G how is shared between primary and replica. Can i tell the size of the primary and replica, plz advise.

thx

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 28, 2020, 3:54pm UTC](https://discuss.elastic.co/t/index-not-rolling-over-correctly/230072/4 "2020-04-28T15:54:50Z")

</div>

Look at the cat shards API.

---

<div class="post-metadata">

**Author:** ![asrinivasan](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@asrinivasan](https://discuss.elastic.co/u/asrinivasan)\
**Post date:** [April 28, 2020, 4:14pm UTC](https://discuss.elastic.co/t/index-not-rolling-over-correctly/230072/5 "2020-04-28T16:14:57Z")

</div>

Thanks so the index shown in kibana is total with replica, so when primary goes to 50G then wiil rollover?

thx for the quick turn around

prod3-cloudwatch-2020.04.18-1 0 p STARTED 46833737 39.4gb 172.20.224.142 elasticsearch-data-0  
prod3-cloudwatch-2020.04.18-1 0 r STARTED 46833737 39.3gb 172.20.224.2 elasticsearch-data-5

---

<div class="post-metadata">

**Author:** ![asrinivasan](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@asrinivasan](https://discuss.elastic.co/u/asrinivasan)\
**Post date:** [April 29, 2020, 3:46pm UTC](https://discuss.elastic.co/t/index-not-rolling-over-correctly/230072/6 "2020-04-29T15:46:04Z")

</div>

Thank you Christian, that was it, it rolled over at 100GB(50GB prim+ 50GBcopy). Appreciate your help

---

<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 27, 2020, 3:46pm UTC](https://discuss.elastic.co/t/index-not-rolling-over-correctly/230072/7 "2020-05-27T15:46:05Z")

</div>

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