Logrotate doesn't rotate well
Hi People,
I've been fighting a lot with this problem and no good results.
I want to rotate all the logs coming from network devices.
First day logs are arriving and storaging well, but when it arrives the daily logrotate, logs are still storaging in the old file (the rotated one), leting empty the new one. See the example:
-rwxr-xr-x. 1 root adm 0 oct 15 03:17 cisco.log
-rwxr-xr-x. 1 root adm 74424 oct 15 08:53 cisco.log.1
Do you know what is causing this issue?
I attach my logrotate.conf
see "man logrotate" for details
rotate log files weekly
weekly
keep 4 weeks worth of backlogs
rotate 4
create new (empty) log files after rotating old ones
create
use date as a suffix of the rotated file
dateext
uncomment this if you want your log files compressed
compress
RPM packages drop log rotation information into this directory
include /etc/logrotate.d
no packages own wtmp and btmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create 0664 root utmp
rotate 1
}
/var/log/btmp {
missingok
monthly
create 0660 root utmp
rotate 1
}
system-specific logs may be configured here
/etc/cron.daily/logrotate
!/bin/sh
test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf
rsyslog.conf
if $fromhost == 'X.X.X.X' then -/var/log/XXXX/cisco.log
if $fromhost == 'X.X.X.X' then ~
Could you give me some help please? If you need futher infromation, please let me know.