rsyslog appears to act on old configuration
- by Jeff Lee
I'm using a template to dynamically generate rsyslog filenames. I've made some changes from my original format, but rsyslog still appears to be using both the new template and the old after restarting.
My filename template went from this:
$template RemoteDailyLog,"/var/log/remote/%hostname%/%$year%/%$month%/%$day%.log"
To this:
$template RemoteDailyLog,"/var/log/remote/%hostname%/%fromhost-ip%/%$year%/%$month%/%$day%.log"
I stopped rsyslogd using service rsyslog stop, deleted all of my log files using rm -rf /var/log/remote/*, and then restarted rsyslogd with service rsyslog start.
The problem is rsyslog seems to be building folder structures of the type "/var/log/remote/%hostname%/%$year%/%$month%/%$day%.log" (i.e., without the remote IP), which no longer appears anywhere in my configuration.
Is it possible that old log or config data have been cached somewhere and are being preserved through the server restart? This is creeping me out a little.