- Posted In
- Red Hat Enterprise Linux
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
keep 4 weeks worth of backlogs
create new (empty) log files after rotating old ones
use date as a suffix of the rotated file
uncomment this if you want your log files compressed
RPM packages drop log rotation information into this directory
no packages own wtmp and btmp -- we'll rotate them here
create 0664 root utmp
create 0660 root utmp
system-specific logs may be configured here
test -x /usr/sbin/logrotate || exit 0
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.