QueueMetrics forum
QueueMetrics => Improving QueueMetrics => Topic started by: emilec on February 23, 2012, 13:51:26
-
If you install Tomcat from the CentOS repo it creates a logrotation file which will ensure that logs are rotated weekly. If you install Tomcat from the Loway repo no logrotation file is created. I would like to propose creating a /etc/logrotate.d/qm-tomcat6 file which is installed from the Loway Repo. The naming convention follows that of the tomcat init script Loway creates.
The default tomcat file looks as follows:
/etc/logrotate.d/tomcat5
/var/log/tomcat5/catalina.out {
copytruncate
weekly
rotate 52
compress
missingok
}
I think the log rotation should be a bit more aggressive and can deal with *.log:
/etc/logrotate.d/qm-tomcat6
/usr/local/queuemetrics/tomcat/logs/*.log {
notifempty
copytruncate
daily
size=+1024k
rotate 10
compress
missingok
}
/usr/local/queuemetrics/tomcat/logs/catalina.out {
notifempty
copytruncate
dateext
daily
size=+1024k
rotate 10
compress
missingok
}
I have gone through the manual steps to set this up in this thread: http://forum.queuemetrics.com/index.php?topic=1441.0
-
Thanks I'll add this for the next release. We will have some changes to infrastructure, most notably an easy way to run AGAW :-)
We track this as bug #1587
-
UPDATE: I have subsequently added size=+1024k to my suggestion as this seems to get past the logrotate.conf issues of only rotating logs weekly (first post updated).