[CentOS] rsyslog as default syslog daemon?

Sat Nov 27 12:24:19 UTC 2010
James Pearson <james-p at moving-picture.com>

Andrej Moravcik wrote:
> Hi all!
> 
> Is anybody here using rsyslog? I am looking for the right solution how 
> to use rsyslog in CentOS 5 as the default logging daemon. We use it 
> because of filtering using regular expressions.
> 
> I switched from sysklogd to rsyslog simply using
> 
> chkconfig --del syslog
> chkconfig --add rsyslog
> chkconfig rsyslog on
> service syslog stop
> service rsyslog start
> 
> but this seems not to be "bullet-proof" solution - when yum automaticaly 
> install updates, sysklogd rpm package runs postinstall scriptlet which 
> unfortunately returns sysklogd back to game (and breaks logging based on 
> regex).

I think your problem is that you did 'chkconfig --del syslog' - as the 
man page states:

--del name
        The  service  is removed from chkconfig management, and any sym-
        bolic links in /etc/rc[0-6].d which pertain to it are removed.

        Note that future package installs for this service may run  chk-
        config  --add,  which  will re-add such links. To disable a ser-
        vice, run chkconfig name off.

I believe you should have done 'chkconfig syslog off' instead.

We use rsyslog instead of sysklogd and don't get this problem.

James Pearson