28 Oct
2008
28 Oct
'08
9:29 p.m.
-----Oprindelig meddelelse----- Fra: Leonard Mills [mailto:lenm@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 Esben