QueueMetrics > Improving QueueMetrics
Add logrotation file for Tomcat to Loway repo
(1/1)
emilec:
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
--- Code: ---/var/log/tomcat5/catalina.out {
copytruncate
weekly
rotate 52
compress
missingok
}
--- End code ---
I think the log rotation should be a bit more aggressive and can deal with *.log:
/etc/logrotate.d/qm-tomcat6
--- Code: ---/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
}
--- End code ---
I have gone through the manual steps to set this up in this thread: http://forum.queuemetrics.com/index.php?topic=1441.0
QueueMetrics:
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
emilec:
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).
Navigation
[0] Message Index
Go to full version