My Elastic Search logs are filling up very fast and need some help rotating the logs.
My config is set to the location - /usr/local/etc/elasticsearch/elasticsearch.yml, where paths are set as below
path.conf: /usr/local/etc/elasticsearch
path.data: /data/elasticsearch
path.logs: /usr/local/var/log/elasticsearch
How can the update this yml file to rotate the logs based on file size so that it gets rotated and cause no disk space issues.
In 5.0+ you can update log4j2.properties to change appender.rolling to look more like appender.deprecation_rolling. In 2.x I believe it is possible but I've forgotten how. The first thing to check is to see if you have log4j extras in the lib directory. If so you should be able set it up but it'll take some googling to find someone that's done it. I haven't but I remember seeing it somewhere.
As to the logs filling up fast, that is usually some other problem. It'd be nice to track that down as well.
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.