Age of index incorrect for ILM

I'm trying out an ILM policy and I'm getting strange results. First, it seems like the indices are reporting the incorrect age. Today is Jan 3, and the index created on Jan 1 has an age of 5.29h. I just now sent off this request

{
  "indices" : {
    ".ds-dev-metricbeat-datastream-2022.01.01-000009" : {
      "index" : ".ds-dev-metricbeat-datastream-2022.01.01-000009",
      "managed" : true,
      "policy" : "dev_policy",
      "lifecycle_date_millis" : 1641227234962,
      "age" : "5.29h",
      "phase" : "hot",
      "phase_time_millis" : 1641053835448,
      "action" : "complete",
      "action_time_millis" : 1641227236163,
      "step" : "complete",
      "step_time_millis" : 1641227236163,
      "phase_execution" : {
        "policy" : "dev_policy",
        "phase_definition" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_primary_shard_size" : "500mb",
              "max_age" : "2d"
            },
            "set_priority" : {
              "priority" : 100
            }
          }
        },
        "version" : 2,
        "modified_date_in_millis" : 1639602175167
      }
    }
  }
}

Any explanation for the above?

Version 7.15.2 elastic cloud

I just realized that the dates are counting from the date of rollover, not the date of creation. My hot stage is designed to have a max age of 2 days which would explain the diff.

1 Like

Yes that's correct, it's all based off the rollover date.

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