[syslog-ng]Question about program()
Hamilton, Andrew Mr.
HamiltonA@hq.5sigcmd.army.mil
Wed, 15 Nov 2000 09:05:40 +0100
In your destination statement for router_total_log you actually have two
destinations, while I haven't actually seen in the docs that this isn't
possible, it is probably not a good practice. Set up two destinations, one
for the file and one for the program, then in your log statement give it two
destination statements. That works for me, so no reason to think it won't
for you.
Regards
Drew
> -----Original Message-----
> From: Hyunmoo Rhee [SMTP:rossi@dreamwiz.com]
> Sent: Wednesday, November 15, 2000 8:45 AM
> To: syslog-ng
> Subject: [syslog-ng]Question about program()
>
> I installed syslog-ng-1.4.8 yesterday. but program() wasn't operate. why
> it doesn't operate?
> my syslog-ng.conf is here.
> =====================================START========================
> options { use_dns(no); };
>
> source router_src {
> udp(port(514));
> };
>
> destination router_total_log {
> file("/root/logfile/router_total_log");
> program(/root/sample.sh);
> };
>
> destination deny_tcp_all_log {
> file("/root/logfile/deny_tcp_all_log");
> };
>
> destination deny_udp_all_log {
> file("/root/logfile/deny_udp_all_log");
> };
>
> filter deny_tcp_all {
> match("tcp");
> };
>
> filter deny_udp_all {
> match("udp");
> };
>
> log {
> source(router_src);
> destination(router_total_log);
> };
>
> log {
> source(router_src);
> filter(deny_tcp_all);
> destination(deny_tcp_all_log);
> };
>
> log {
> source(router_src);
> filter(deny_udp_all);
> };
> =================================END======================
>
> sample.sh is simple script. (echo asdf >> /root/sample.txt)
> but doesn't operate. shell script permission is 755.
> .....
>
> _______________________________________________
> syslog-ng maillist - syslog-ng@lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng