[syslog-ng]Question about file handles, programs and time_reopen

Balazs Scheidler syslog-ng@lists.balabit.hu
Sun, 05 Dec 2004 14:35:03 +0100


On Sat, 2004-12-04 at 19:56, Mike Tremaine wrote:
> I was doing a little experimenting on syslog-ng [syslog-ng-1.6.5-6 from
> rpm package] and was curious what happens if the destination object is
> destroyed. I read the configs option "time_reopen" [mine is set to 10, I
> assume that is secs], does this control all output options or just
> network connections? 
> 
> 2 examples.
> 
> If you have a log file that is removed while syslog-ng is running is
> there a way to have syslog-ng re-create the file. I tried it and the
> file didn't not come back even though there was more data.

you currently have to send a SIGHUP for that to syslog-ng.

> 
> Same experiment with a program. Syslog-ng forks a child program at
> start-up but what happens if that child dies. I did a kill -9 just to
> see if it would detect the absence and try to re-fork. 
> 
> If I want these features do I need to look outside of syslog-ng [some
> sort of daemon watcher that will throw a HUP].

you need a daemon watcher that restarts the program if it exited while
keeping the stdin opened.

-- 
Bazsi