I am looking for the best method to prune indexes with 0 documents.
After we migrated to ILM, we have a few indexes which rollover with 0 documents and this can cause an in-balance across a large cluster where several nodes end up with many shards with 0 documents but not much space utilized as other nodes end up with fewer shards and much more disk utilization. I can't find if we can make an index in delete phase skip min_age if it has 0 documents.
We have several indexes that have 0 docs so far as we have several "Retention" periods for filebeat logging data. Some of those are unused at the moment. We roll over indexes when the shards are approximately 50GiB in size or typically 24 hours old. This is to mainly match previous daily index rollover behavior of Elasticsearch.
Anyhow it looks like I found a potential solution being that I can run curator to prune empty indexes that are an age > the rollover period so we don't accidentally prune the hot index.
That effectively makes these no long time-series data, though it would keep the number of 0 doc indexes down to the minimum. It would also permit some time-series data to live much longer than it's desired retention period.
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.