From: Fred Leon <raptor@drakonix.fr>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] syslog-ng filtering
Date: Wed, 17 Mar 2010 11:48:09 +0100 [thread overview]
Message-ID: <20100317114809.15276ejrcffkv3hl@mail.drakonix.fr> (raw)
In-Reply-To: <17bd4e851003161949m69b27505ja45e07b48180135c@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1494 bytes --]
Ralph Slooten <axllent@gmail.com> a écrit :
> On 17 March 2010 13:00, Roy Wright <roy@wright.org> wrote:
>>
>> I just started with the example at:
>> http://en.gentoo-wiki.com/wiki/Syslog-ng
>>
>> HTH,
>> Roy
>
> Thanks Roy, however they have the same syntax which isn't working on my
> side.
>
> filter f_shorewall { not match("regex" value("Shorewall")); }
>
>
> I just tried a single rule (to make sure it wasn't my syntax):
>
> filter killVmMessages {
> not match("regex" value("vmware-checker"));
> };
>
> yet the "(root) CMD (/root/bin/vmware-checker)" messages still go through?!
>
> log {
> source(src);
> source(remote);
> filter(myfilter);
> filter(killVmMessages);
> destination(d_mysql);
> };
>
> I'm really stumped here. All other filters (non regex) works fine though,
> such as facility() & host().
>
> Are you able to filter by content?
>
> Ralph
>
Perhaps you could try this which is working for me and let me filter
all messages coming from iptables:
# firewall logging
destination iptables { file("/var/log/firewall/iptables.log"); };
filter f_iptables { message("iptables"); };
log { source(s_all); filter(f_iptables); destination(iptables); };
# all messages coming from kern
destination df_kern { file("/var/log/system/kern.log" ); };
filter f_kern { facility(kern) and not filter(f_iptables); };
log { source(s_all); filter(f_kern);destination(df_kern); };
Fred
[-- Attachment #2: Signature numérique PGP --]
[-- Type: application/pgp-signature, Size: 230 bytes --]
next prev parent reply other threads:[~2010-03-17 10:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-16 23:22 [gentoo-user] syslog-ng filtering Ralph Slooten
2010-03-17 0:00 ` Roy Wright
2010-03-17 2:49 ` Ralph Slooten
2010-03-17 10:48 ` Fred Leon [this message]
2010-03-17 10:39 ` Alan McKinnon
2010-03-17 11:12 ` [gentoo-user] " Robert Fekete
2010-03-17 20:16 ` [gentoo-user] " Ralph Slooten
2010-03-17 20:31 ` Alan McKinnon
2010-03-19 7:56 ` [gentoo-user] " Robert Fekete
2010-03-17 20:40 ` [gentoo-user] " Keith Dart
2010-03-17 21:43 ` Ralph Slooten
2010-03-18 6:39 ` Alan McKinnon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100317114809.15276ejrcffkv3hl@mail.drakonix.fr \
--to=raptor@drakonix.fr \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox