Removing old indices in elasticsearch

Curator would be an ideal match here.
You can find the link here – https://github.com/elastic/curator

A command like below should work just fine –

curator --host <IP> delete indices --older-than 30 --prefix "twitter-" --time-unit days  --timestring '%Y-%m-%d'

You can keep in this in the CRON for removing the indices occasionally.

You can find some examples and docs here – https://www.elastic.co/guide/en/elasticsearch/client/curator/current/examples.html

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)