[syslog-ng] filter on src ip address.

Balazs Scheidler bazsi at balabit.hu
Wed Oct 29 09:47:21 CET 2008


On Tue, 2008-10-28 at 22:29 +0100, Esben Laursen wrote:
> 
> > -----Oprindelig meddelelse-----
> > Fra: Leonard Mills [mailto:lenm at ops.corpnet.sel.sony.com]
> > Sendt: 28. oktober 2008 22:24
> > Til: Esben Laursen
> > Emne: Re: [syslog-ng] filter on src ip address.
> >
> > Esben wrote:
> > >Now the next question is, can I have the syslog-ng accept everyting, but
> > >"auto" generate a new file for each different source addresses?
> >
> > Sure, you can use $HOST as a part of the path.  Something like:
> >
> > destination cacheflow   { file("/c1/logs/$HOST/cacheflow.log"
> > template("$DATE $HOST $PROGRAM: [$FACILITY.$PRIORITY] $MSG\n")); };
> >
> > (all one line) works just fine.
> 
> 
> Hmm, looks pretty easy.. So the $HOST is the "remote" source host and not "localhost" right?
> 
> Where did you find the variable list? It was not in the man 5 syslog-ng.conf file..
> 
> Cheers

The link to the complete documentation can be found in each
list-footer :), also you can find it under the "Support/Documentation"
menu of our website.

-- 
Bazsi




More information about the syslog-ng mailing list