Novell SLES logrotate doesn't rotate all my specified logs
I am running Novell SLES 11 and have two virtual hosted sites running on this server with Apache. I am trying to get both sites to rotate their logs monthly so I then can take the monthly logs and throw them into a web analyzer to analyse the web traffic. Long story short I can't get the log files to rotate. Here is my /etc/logrotate.d/apache2 file:
/var/log/apache2/access_log {
compress
dateext
maxage 365
rotate 99
size=+4096k
notifempty
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}
/var/log/apache2/error_log {
compress
dateext
maxage 365
rotate 99
size=+1024k
notifempty
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}
/var/log/apache2/site-access_log {
compress
rotate 5
monthly
maxage 180
dateext
notifempty
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}
/var/log/apache2/site1-access_log {
compress
rotate 5
monthly
maxage 180
dateext
notifempty
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}
/var/log/apache2/suexec.log {
compress
dateext
maxage 365
rotate 99
size=+1024k
notifempty
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}
/var/log/apache2/ssl_request_log {
compress
dateext
maxage 365
rotate 99
size=+4096k
notifempty
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}
/var/log/apache2/ssl_engine_log {
compress
dateext
maxage 365
rotate 99
size=+1024k
notifempty
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}
The /var/log/apache2/access_log and /var/log/apache2/error_log appear to be rotating fine. But the ones I am in need of to work are the two /var/log/apache2/site-access_log and /var/log/apache2/site1-access_log. When I run logrotate -d -f /etc/logrotate.d/apache2 I get
reading config file /etc/logrotate.d/apache2
reading config info for /var/log/apache2/access_log
reading config info for /var/log/apache2/error_log
reading config info for /var/log/apache2/site-access_log
reading config info for /var/log/apache2/site1-access_log
reading config info for /var/log/apache2/suexec.log
reading config info for /var/log/apache2/ssl_request_log
reading config info for /var/log/apache2/ssl_engine_log
Handling 7 logs
rotating pattern: /var/log/apache2/access_log forced from command line (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apache2/access_log
log needs rotating
rotating log /var/log/apache2/access_log, log->rotateCount is 99
dateext suffix '-20100622'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
renaming /var/log/apache2/access_log to /var/log/apache2/access_log-20100622
creating new /var/log/apache2/access_log mode = 0644 uid = 0 gid = 0
running postrotate script
running script with arg /var/log/apache2/access_log : "
/etc/init.d/apache2 reload
"
compressing log with: /bin/gzip
rotating pattern: /var/log/apache2/error_log forced from command line (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apache2/error_log
log needs rotating
rotating log /var/log/apache2/error_log, log->rotateCount is 99
dateext suffix '-20100622'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
renaming /var/log/apache2/error_log to /var/log/apache2/error_log-20100622
creating new /var/log/apache2/error_log mode = 0644 uid = 0 gid = 0
running postrotate script
running script with arg /var/log/apache2/error_log : "
/etc/init.d/apache2 reload
"
compressing log with: /bin/gzip
rotating pattern: /var/log/apache2/site-access_log forced from command line (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apache2/site-access_log
log needs rotating
rotating log /var/log/apache2/site-access_log, log->rotateCount is 5
dateext suffix '-20100622'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
renaming /var/log/apache2/site-access_log to /var/log/apache2/site-access_log-20100622
creating new /var/log/apache2/site-access_log mode = 0644 uid = 0 gid = 0
running postrotate script
running script with arg /var/log/apache2/site-access_log : "
/etc/init.d/apache2 reload
"
compressing log with: /bin/gzip
rotating pattern: /var/log/apache2/site1-access_log forced from command line (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apache2/site1-access_log
log needs rotating
rotating log /var/log/apache2/site1-access_log, log->rotateCount is 5
dateext suffix '-20100622'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
renaming /var/log/apache2/site1-access_log to /var/log/apache2/site1-access_log-20100622
creating new /var/log/apache2/site1-access_log mode = 0644 uid = 0 gid = 0
running postrotate script
running script with arg /var/log/apache2/site1-access_log : "
/etc/init.d/apache2 reload
"
compressing log with: /bin/gzip
rotating pattern: /var/log/apache2/suexec.log forced from command line (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apache2/suexec.log
log /var/log/apache2/suexec.log does not exist -- skipping
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/apache2/ssl_request_log forced from command line (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apache2/ssl_request_log
log /var/log/apache2/ssl_request_log does not exist -- skipping
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/apache2/ssl_engine_log forced from command line (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apache2/ssl_engine_log
log /var/log/apache2/ssl_engine_log does not exist -- skipping
not running postrotate script, since no logs were rotated
It looks like site and site1 need rotating and a new compressed file should exist but it doesn't. I am not sure what the glob finding old rotated logs failed is all about either.
Any suggestions?
|