Open sivachinnayan opened 8 years ago
Added logrotate configuration:
$ vim /etc/logrotate.conf
/var/log/consul.log {
size 100M
copytruncate
rotate 4
compress
}
apply changes logrotate for the /etc/logrotate.conf starting logrotate
$logrotate /etc/logrotate.conf
After running the logrotate against logrotate.conf, the result show consul logs are copied and trucncated.
$ls -rlth consul.log*
-rw-r--r--. 1 root root 3.3M Sep 2 15:12 consul.log-20160902.gz
-rw-r--r--. 1 root root 106K Sep 2 15:19 consul.log
Within a week with 4 services running with max of 2 nodes on/off threw log size of more than 110 MB, There needs to be a log rotation to keep in check the log size.