FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 11-26-2010, 05:44 PM
Andrej Moravcik
 
Default rsyslog as default syslog daemon?

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).

# rpm -q --scripts sysklogd
postinstall scriptlet (using /bin/sh):
if [ "$1" -ge 1 ]; then
/sbin/chkconfig --add syslog <<HERE
for n in /var/log/{messages,secure,maillog,spooler}
do
[ -f $n ] && continue
touch $n
chmod 600 $n
done
/sbin/service syslog condrestart > /dev/null 2>&1
fi
exit 0
...


# chkconfig --list syslog
syslog 0ff 1ff 2n 3n 4n 5n 6ff



Meanwhile, automatic update of rsyslog package results (thanks to
postinstall scriptlet) into disabled rsyslog :-/ ...

# rpm -q --scripts rsyslog
postinstall scriptlet (using /bin/sh):
/sbin/chkconfig --add rsyslog <<HERE
for n in /var/log/{messages,secure,maillog,spooler}
do
[ -f $n ] && continue
umask 066 && touch $n
done
...

# chkconfig --list rsyslog
rsyslog 0ff 1ff 2ff 3ff 4ff 5ff 6ff



- uninstalling sysklogd package will not solve the problem of disabling
rsyslog after yum update. Or should I uninstall it and simply change '#
chkconfig:' part of rsyslog rc script?

- I don't want to disable automatic updates of sysklogd and rsyslog
packages using /etc/yum.conf:exclude=... bacause of security reasons.

- I think about using 'alternatives', but I am not sure if it is the
appropriate solution.

- should I report to Red Hat's bugzilla?



Maybe I overlooked something in documentation.

Thank you for any advice and patience.


Andrej

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-27-2010, 11:24 AM
James Pearson
 
Default rsyslog as default syslog daemon?

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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-01-2010, 01:44 PM
Andrej Moravcik
 
Default rsyslog as default syslog daemon?

James Pearson wrote:
>
> 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.

Thank you James, you are right, 'chkconfig syslog off; chkconfig rsyslog
on' solved this problem.

Andrej

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 12:58 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org