Re: [syslog-ng] filter on src ip address.
-----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
On Tue, 2008-10-28 at 22:29 +0100, Esben Laursen wrote:
-----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
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
participants (2)
-
Balazs Scheidler
-
Esben Laursen