Index Lifecycle Policy understanding

Hi,

I have a question about Index Lifecycle Policy.

What I want is as follow:

A hot phase that is no longer than 14 days.
A warm phase for older records.
No cold phase.
The data older than 28 days should be deleted.

My ILM is defined like this:

    {
      "my-docs-ilm-policy" : {
        "version" : 2,
        "modified_date" : "2020-12-01T05:45:54.825Z",
        "policy" : {
          "phases" : {
            "warm" : {
              "min_age" : "0ms",
              "actions" : {
                "set_priority" : {
                  "priority" : null
                }
              }
            },
            "hot" : {
              "min_age" : "0ms",
              "actions" : {
                "rollover" : {
                  "max_size" : "50gb",
                  "max_age" : "14d"
                },
                "set_priority" : {
                  "priority" : 100
                }
              }
            },
            "delete" : {
              "min_age" : "28d",
              "actions" : {
                "wait_for_snapshot" : {
                  "policy" : "daily-snapshots"
                },
                "delete" : {
                  "delete_searchable_snapshot" : true
                }
              }
            }
          }
        }
      }
    }

My questions are:

  1. Is it mandatory to have a cold phase?
  2. Does my definition match my requirements?

What is not clear for me is when will the records be deleted. When I do:

GET .ds-my-docs-*/_ilm_explain

I get something that looks like this:

    {
      "indices" : {
        ".ds-my-docs-000002" : {
          "index" : ".ds-my-docs-000002",
          "managed" : true,
          "policy" : "my-docs-ilm-policy",
          "lifecycle_date_millis" : 1607394904201,
          "age" : "3d",
          "phase" : "warm",
          "phase_time_millis" : 1607394905252,
          "action" : "complete",
          "action_time_millis" : 1607394905368,
          "step" : "complete",
          "step_time_millis" : 1607394905368,
          "phase_execution" : {
            "policy" : "my-docs-ilm-policy",
            "phase_definition" : {
              "min_age" : "0ms",
              "actions" : {
                "set_priority" : {
                  "priority" : null
                }
              }
            },
            "version" : 2,
            "modified_date_in_millis" : 1606801554825
          }
        },
        ".ds-my-docs-000003" : {
          "index" : ".ds-my-docs-000003",
          "managed" : true,
          "policy" : "my-docs-ilm-policy",
          "lifecycle_date_millis" : 1607394904283,
          "age" : "3d",
          "phase" : "hot",
          "phase_time_millis" : 1607394904780,
          "action" : "rollover",
          "action_time_millis" : 1607395504469,
          "step" : "check-rollover-ready",
          "step_time_millis" : 1607395504469,
          "phase_execution" : {
            "policy" : "my-docs-ilm-policy",
            "phase_definition" : {
              "min_age" : "0ms",
              "actions" : {
                "rollover" : {
                  "max_size" : "50gb",
                  "max_age" : "14d"
                },
                "set_priority" : {
                  "priority" : 100
                }
              }
            },
            "version" : 2,
            "modified_date_in_millis" : 1606801554825
          }
        }
      }
    }

I can see that hot index will be rolled over to warm after 14 days but I don't see that my warm index will go into delete phase after 28 days. Is there something wrong?

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