[Cialug] logrotation help for RHEL 6
Kelly Slaugh
kelly at visionary.com
Tue Jan 27 09:51:24 CST 2015
Hello Everyone,
I've been working on troubleshooting why a particular config file will not rotate daily as I've set the config file to do. Here is my config file details minus actual path.
/path/to/directory/logs/*log {
daily
missingok
rotate 32
notifempty
size 512M
compress
delaycompress
create 644 apache apache
sharedscripts
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
/sbin/service nginx reload > /dev/null 2>/dev/null || true
endscript
}
I'm having to reload nginx as well has apache because the logs that are stored are apache and nginx logs. And as we know apache and nginx will not start using the logs unless they are reloaded. The config file is stored in the /etc/logrotate.d/ directory. Everything works on the weekly rotation set up in the /etc/logrotate.conf file. However, from my research and knowledge isn't logrotate supposed to rotate the files based off the config file settings?
Any help or ideas would be greatly appreciated.
Thank you
Kelly S.
More information about the Cialug
mailing list