[syslog-ng] Logging only certain logs to a remote syslog server
Paras Fadte
plfgoa at gmail.com
Mon Nov 9 06:29:51 CET 2009
Hi Bill,
Thanks for the response . When I tried the following it didn't seem to
work. The remote host doesn't show any logs .
source postgreslog {file("/home/postgres/data_log-8_4_1"); };
destination postgresloghost { udp("192.168.1.8" port(5140)); };
log { source(postgreslog); destination(postgresloghost); };
But the following works :
filter f_postgres { facility(local0) and match('postgres'); };
destination postgresloghost { udp("192.168.1.8" port(5140)); };
log { source(src); filter(f_postgres); destination(postgresloghost);
flags(final); };
What could be wrong ? I have also noticed that the remote syslog
server logs these messages in its /var/log/messages file also . Can
this be prevented ?
Thank you
-Paras
On Thu, Nov 5, 2009 at 9:12 PM, Bill Nash <billn at billn.net> wrote:
> Sure, it's very easy. Create a source stanza for the files you want to
> monitor. Create a destination stanza for the host you want to send to. Add
> another log stanza containing them both.
>
> source mysqllog { file("/var/lib/mysql/mysql.err" log_prefix("mysql: "); };
> destination mysqlloghost { udp("192.168.1.1" port (514)); };
> log{ source(mysqllog); destination(mysqlloghost); };
>
> - billn
>
> On Thu, Nov 5, 2009 at 2:00 AM, Paras Fadte <plfgoa at gmail.com> wrote:
>>
>> Hi,
>>
>> Is it possible to log only a particular logs to a remote syslog server
>> ? For example logging only mysql/postgres logs to a remote host .
>> syslog-ng version used is syslog-ng 1.6.8
>>
>> Thank you.
>>
>> -Paras
>>
>> ______________________________________________________________________________
>> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
>> Documentation:
>> http://www.balabit.com/support/documentation/?product=syslog-ng
>> FAQ: http://www.campin.net/syslog-ng/faq.html
>>
>
>
>
> --
>
> - billn
>
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation:
> http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.campin.net/syslog-ng/faq.html
>
>
>
More information about the syslog-ng
mailing list