Time based indexes and automatic deletion of created indexes

(Sameer Darpe) #1


I am planning to upgrade ES 2.3 to 5.3. We are using Nest client and Sense(chrome extension) to see data.
Since ttl is removed in ES 5.3, I am looking alternative way for it.

I am looking for solution like, index will be created with expiration time and after time(i.e. which we have set at the time of index creation) will be automatically deleted. No need to explicitly run the query or code to delete the created index manually.
Is there any way to achieve this.
Please help.

Thanks :slight_smile:

(Shane Connelly) #2

This is a pretty common situation people do. The general way to deal with this is with curator and setting up time-based indices (e.g. 1 per day). Curator has a delete_indices action, and the example does more or less exactly what you're looking for: deleting an index matching some pattern that is older than N days.

(Aaron Mildenstein) #3

To be clear, the answer to this question is no. There is no such solution within Elasticsearch. The APIs are provided so you can roll your own. As @shanec mentioned, Curator provides a way to automate this (and many other actions) with cron.

(Sameer Darpe) #4

Thanks for your reply. I will try with other 2 options.

(system) #5

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