[syslog-ng] Reading from standard input

Remy Zandwijk remy at luckyhands.nl
Fri Jul 29 15:35:45 CEST 2011


Hi list,

I use syslog-ng to create log files from within a script. The script sends the 
message through a pipe to syslog-ng, which I use as command line tool. In the 
syslog-ng.conf I created a source which reads the standard input. very simplified:

Config:
     source src { pipe("/dev/fd/0"); };
     destination dst { file("/tmp/test.log"); };
     log { source(src); destination(dst); };

Called as:

     echo "test" | /usr/sbin/syslog-ng -f /tmp/syslog-ng.conf


This works perfectly in 2.0.9. Now I am in the process of upgrading the system 
and syslog-ng 3.2.4. With this version of syslog-ng the config file above 
results in an error:

     Error opening file for reading; filename='/dev/fd/0', error='Text file 
busy (26)'
     Error initializing source driver; source='src', id='src#0'
     Error initializing message pipeline;


I tried several things to get rid of this error, like replacing 'pipe' in 
'file', but nothing seems to work.

Any ideas?


Regards,
Remy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20110729/b017e049/attachment.htm 


More information about the syslog-ng mailing list