[syslog-ng]Program destination ?

David Vaartjes syslog-ng@lists.balabit.hu
Fri, 23 Apr 2004 12:15:51 +0200


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.

Thanks in advance,

David