INdex not rolling over correctly

I have a ILM policy
template, policy, alias

{
  "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

{
  "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

{
  "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

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

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

Look at the cat shards API.

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

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

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