I have made this change and restarted the service but the file count hasn't changed.
This post also discusses this issue. One person mentions their version doesn't support the feature and another person mentions the use of logrotate. Deleting old ES logs /var/log/elasticsearch
I have two questions:
Which version of Elasticsearch supports the use of maxBackupIndex? (I am currently running v1.3.2)
What is logrotate and is there any information on using that?
I am trying to avoid writing a custom script to delete the files and scheduling it, but I can if necessary.
What logging.yml configuration did you try? I would expect maxBackupIndex to work in ES 1.3.2.
What is logrotate and is there any information on using that?
logrotate is a program that rotates logs. I'd be very surprised if you didn't already have it installed. See the man page and the configuration files you already have (probably in /etc/logrotate.d).
I've only added it under file with type of dailyRollingFile. I confirmed today that it is still creating new files (all of the counts on my servers have increased by 1 since yesterday) even with this setting enabled.
Is there any way to confirm which version of ES the maxBackupIndex feature was implemented in?
I believe this setting can be used in conjunction with the maxFileSize parameter to limit how many files get created per logging period. So if I had maxFileSize set to something like 100 MB and maxBackupIndex set to 5, then ES (log4j) would only keep 500 MB of data for that current logging period (day).
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.