What would be the best way to do log retention in Open Source Elasticsearch?
I'm using Elasticsearch 7.6 and I was reading about lifecycle management, but as far as I understand, it's part of X-Pack.
What is the best way to delete indices periodically using only the open source components? Is curator still a viable option?
I'm running Elasticsearch on Docker Swarm. Should I run curator inside a container as a cron job?
This adds indices of the pattern yourindex-2020.06.08-000001 yourindex-2020.06.15-000002 yourindex-2020.06.22-000003
...
New index is created as per ilm rollover policy (eg. 7days or 50GB in above example).
After 21 days the index will be deleted automatically.
@arixmf The idea in this method is that, we use index alias to write/read the documents. Elasticsearch will handle where to write the index.
In your case, you should use the alias name to write/read the indices. Say filebeat-app_logs
Elasticsearch will handle the creation of new index and rotation based on your ILM policy.
This way you don't need manual intervention or external handler like curator.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.