Hi Teams,
can anyone help me in configuring logrotate in "version" : {"number" : "6.1.1", to reduce my Disk size,
I want to only keep 7 days logs and in zipped format.
i could see these 2 file in logstash file: log4j2.properties logstash.yml


Heya, welcome to the community. Can you clarify, are you asking about Elasticsearch or Logstash?

Hi jason,
its about logstash.
it was around 4 days back my Disk turn as critical all of sudden, after investigating i found /var/logstash/ --- taking lots of space, and it was like last month logs, so i cleaned it and kept a cron job to keep only for 7 days.But again yesterday, automatically logs size increased like hell, as of now i have zipped it, But looking fwd with Log-rotate to keep (i only want to keep 7 Days logs not more than), can you please help in this.


The log4j2.properties will contain the log rotation directives - you need to understand log4j syntax to modify it however.

On our systems, we've opted for a simple crontab entry:

* 0 * * * /usr/bin/find /logs/logstash -type f -mtime +7 -delete

Since this is about Logstash, we moved this to the Logstash category.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.