rsyslog appears to act on old configuration

Posted by Jeff Lee on Server Fault See other posts from Server Fault or by Jeff Lee
Published on 2012-04-04T22:01:01Z Indexed on 2012/04/04 23:32 UTC
Read the original article Hit count: 256

Filed under:
|

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.

© Server Fault or respective owner

Related posts about logging

Related posts about rsyslog