[syslog-ng]Program destination ?

Balazs Scheidler syslog-ng@lists.balabit.hu
Sun, 25 Apr 2004 20:32:16 +0200


2004-04-23, p keltezéssel 12:15-kor David Vaartjes ezt írta:
> Hello list,
> 
> I'm testing syslog-ng to send certain messages to the stdin of a 
> program. I've set the following lines in "syslog-ng.conf" to 
> accomplish this:
> 
> <CONFIG-LINES>
> destination alerter { program("/home/dv/download/perl-test.pl"); };
> 
> filter f_special {
>          match("special");
> };
> 
> log { source(src); filter(f_special); destination(alerter); };
> </CONFIG-LINES>
> 
> The perl-test.pl looks like:
> 
> <PERL-TEST.PL>
> #!/usr/bin/perl
> 
> while (<>)
> {
>          print $_ . "\n";
> }
> </PERL-TEST.PL>
> 
> If I do a 'logger -p daemon.notice "special"' the message is not 
> send to the stdin of perl-test.pl. However, if i do a 'echo "test" 
>  > /proc/3240/fd/0" the data is send to the stdin of perl-test.pl 
> and shown on the console by perl-test.pl as expected.
> 
> I can't figure out why syslog isn't sending messages to 
> perl-test.pl. If i change the "destination" in syslog-ng.conf to 
> write to a file, everything works fine.
> 
> Hope someone can shed some light on this one.

I can't remember exactly, but it is possible that syslog-ng redirects
the program output to /dev/null

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1