[syslog-ng] filter on src ip address.

Esben Laursen el at rantek.dk
Tue Oct 28 22:29:54 CET 2008

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



More information about the syslog-ng mailing list