I am using rsyslog and have a number of network devices sending their logs to this server. Rsyslog then splits each out device's logs into "devicename.log". Via this:
$template FILENAME,"/data/logs/%fromhost%.log"
*,local0,local1,local2,local3,local4,local5,local6,local7,uucp,user.* ?FILENAME
I am then trying to logrotate these files. I have the following in my logrotate.conf.
/data/logs/*.log {
daily
create 666 root root
rotate 30
missingok
notifempty
compress
postrotate
reload rsyslog >/dev/null 2>&1 || true
endscript
}
Except after the logrotate job runs, about half the devices logs just stop being logged too, until I manually reload syslog. It's almost like rsyslog, just doesn't save logs for half the devices until I restart rsyslog.
Any ideas?