[syslog-ng]Filter on hosts ?

Brian Ipsen syslog-ng@lists.balabit.hu
Fri, 20 Jun 2003 21:20:41 +0200


Hi!

 I'm trying to get syslog-ng to filter out traps from certain hosts... In my
syslog-ng.conf I have:

destination d_snmptrapd { file("/var/log/snmptrapd"); };
destination d_snmptrapd_network { file("/var/log/snmptrapd.network"); };

filter f_snmptrapd   { program(snmptrapd) and not
host("192.168.0.230|192.168.1.230|192.168.0.231"); };
filter f_snmptrapd_network   { program(snmptrapd) and
host("192.168.0.230|192.168.1.230|192.168.0.231"); };

log { source(s_sys); filter(f_snmptrapd); destination(d_snmptrapd); };
log { source(s_sys); filter(f_snmptrapd_network);
destination(d_snmptrapd_network); };

But traps from 192.168.0.230 still ends up in /var/log/snmptrapd - and
nothing is written to /var/log/snmptrapd.network

Am I completely wrong regarding my regular expresisons (I'm no expert in
that field) ??

Regards

/Brian