Deleting daily indices

I am having daily indices. I want to delete past indices beyond the last seven days. I read about date maths in index names but I dont find a direct way of doing that in a single query.

My current strategy is as follows:

  1. get all indices using _cat/indices API
  2. figure out old indices
  3. call DELETE iteratively on those indices

Please let me know if there is a better way to do it.

I also looked at Curator but it is no more supported. Are those functionalities incorporated in some other tool?

I think Index Lifecycle Management is the feature for you. It is not yet released, but is expected to appear in the next minor release (6.6).

Great. I was thinking if it is not there I can add a feature request for it.

Who told you that Curator was no longer supported? It works quite well for every minor release of Elasticsearch 5.x and 6.x

Ah, my bad. Just checked the supported versions and it says Curator version 5.x will work with ES 6.x. Thank you for clarifying.

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