[syslog-ng] Question about reopening sockets

Zoltan HERPAI wigyori at uid0.hu
Fri Jul 3 22:16:25 CEST 2009


Hi all,

I'm writing a small script that would be fed with data via pipe by 
syslog-ng 2.0.9. The script itself is responsible for creating the 
socket into which syslog-ng would be writing to. I'm looking for an 
option within syslog-ng that would allow for reopening the socket in 
case the script dies, quits, or it gets removed for some reason (like an 
epic admin fail).

I did some testing, and as per that, checking with lsof, syslog-ng opens 
the socket only on the first time it would be writing to that 
destination, which is good. After the socket gets removed, it shows up as...

syslog-ng 31666        root   17u     FIFO      253,2                
24624 /tmp/pw.sock (deleted)

... in lsof, and the deleted flag does not go away after the socket gets 
recreated (f.e. the script is restarted), and a test message is sent 
into the given destination. Is there a config option available for 
reopening sockets?

Thanks,
Zoltan HERPAI



More information about the syslog-ng mailing list