Index ILM policy is not working as desired

Hello all,

I found a document which points to setup an ILM policy for elastiflow indexes but when I applied it didn’t worked as I hoped.

After applying this, elasticsearch gave me this error message :

“index.lifecycle.rollover_alias XXXX does not point to index”

Anybody can help to find a working solution to setup an ILM policy to delete old indexes ?
Thank you

Mehmet

Which version of ElastiFlow are you running? They typically come with an ILM policy.
Are you using ECS? If not, this policy won’t work.

Here’s the JSON for the ‘elastiflow’ ILM that comes with ElastiFlow 7.2.2. Since I am using CODEX this ILM policy will be applied to all indices that match the ‘elastiflow-*-codex-*’ name pattern.


PUT _ilm/policy/elastiflow
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_age": "1d",
            "max_primary_shard_size": "20gb"
          }
        }
      },
      "delete": {
        "min_age": "7d",
        "actions": {
          "delete": {
            "delete_searchable_snapshot": true
          }
        }
      }
    }
  }
}