[CentOS] rsyslog expression based filters

Kanwar Ranbir Sandhu

m3freak at thesandhufamily.ca
Mon May 25 17:59:31 UTC 2009


Hello All,

Does the rsyslog version in CentOS 5 support expression based filters?
I'm asking because a filter I believe should be working, isn't and I
cannot figure out why.

I'm trying to get the following expression working (might wrap):

if $source == 'astappsrv2' and $programname == 'asterisk' then /var/log/asterisk/astappsrv2.log

Every time I restart rsyslog, I get this error (slightly edited to make
it fit):

rsyslogd:unknown priority name "log"
rsyslogd:the last error occured in /etc/rsyslog.conf, line 16
rsyslogd:warning: selector line without actions will be discarded


The line rsyslog is having problems with is the expression based filter.
astappsrv2 is the log client, and it's successfully sending it's logs to
the remote log host (the one on which I'm having problems with the
expression filter).  I know the logs are coming in because I've setup
property based filters that all work just fine.

I can take this to the rsyslog list if need be. I wanted to try here
first.

Regards,

Ranbir

-- 
Kanwar Ranbir Sandhu
Linux 2.6.27.21-170.2.56.fc10.x86_64 x86_64 GNU/Linux 
13:46:04 up 1 day, 14:56, 4 users, load average: 1.03, 0.41, 0.14 





More information about the CentOS mailing list