ES6.8 vs monitoring retention

Reading Logging indices retention it seems that ES6.8 might no adhere to xpack.monitoring.history.duration default value of 168h ~7days.

And without any default ilm policy I created my own:

{
  "delete_after_7days" : {
    "version" : 1,
    "modified_date" : "2022-02-25T10:47:59.852Z",
    "policy" : {
      "phases" : {
        "hot" : {
          "min_age" : "0ms",
          "actions" : {
            "set_priority" : {
              "priority" : 90
            }
          }
        },
        "delete" : {
          "min_age" : "7d",
          "actions" : {
            "delete" : { }
          }
        }
      }
    }
  }
}

I extracted current mapping of eg. .monitoring-es and added the lifecycle.name to it's setting and PUTed it back, but can't GET this back with this lifeycle settings, why not?

TIA!

Added lifecycle.name settings:

re-retrieving the template settings is still not there?

:slight_smile: just tried this format instead which seems to work

Weirdly it seems to disappear from templates again, appreiciate any hints as to why this might happen...

Applied previous the ilm policy delete_after_7days to .monitoring-es template as in line 253 but fetching template again in line 252 seen on the right now again shows no ilm policy, where did that goes in the last two days.

weirdly if I choose to set the ILM policy in the templates through Kibana: Management->Index LifeCycle Policy->Actions->Add policy to index template

If I GET the template afterwards it looks the same as expected:

...
"settings" : {
  "index" : {
     ...
     "lifecycle" : {
         "name" : "my-policy"
      }
  }
}
...

But more importantly now it seems to stay here also next day :slight_smile:

Wondering though what's the difference in setting it 'manually' into the templates or through the Kibana UI's Actions->Add policy to index template?

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