Custom index age logic for ILM policies

Hello,

The ILM is great for managing the indexes and keeping the database clean, though upgrading to a new version of Elasticsearch requires re-indexing of almost all of the existing data, e.g. bumping from ELK v6 to ELK v7.

This will cause all your indexes to be recreated with a new created_at timestamp and ILM won't work as expected. Moreover it can lead to somehow tragic results when your ILM policy will match the re-indexed data timestamp and a great chunk of your data could be deleted at once.

As @Christian_Dahlqvist mentioned here: Is it possible change creation_date on reindexed Indexes to get Life cycle Management to work on old indexes it would be very useful to add some logic for defining index age based on the data field from the records.

I can see it can be done from the Curator as @theuntergeek mentioned but if I understand correctly, this can't be run automatically.

Is there any chance or plans for introducing this functionality? Or maybe you know any workaround for this issue?

Kind regards,
Marcin

1 Like