[syslog-ng] Running script for checking syslog-ng status

Gergely Nagy algernon at balabit.hu
Thu May 26 10:49:08 CEST 2011


Gergely Nagy <algernon at balabit.hu> writes:

> "Henry Xu" <xkb.surfing at gmail.com> writes:
>
>> Hi All,
>> 	Does syslog-ng have a running script that check the syslog-ng
>> running status?
>> 	If it crashed or stopped running,this script can make sure to start
>> a new syslog-ng process.
>> 	This morning,the syslog-ng on my server crashed,and somehow resulted
>> in the server halt.
>> 	Thanks.
>
> "syslog-ng-ctl stats" is the closest thing. Apart from that, you can
> save the PID of syslog-ng to a pidfile, and verify that the PID is still
> present, and if it belongs to syslog-ng (syslog-ng will by default, save
> a pidfile, FYI).

It was also brought to my attention, that syslog-ng has a built-in
supervisor, that will restart it in case it crashes. This can be enabled
by starting syslog-ng with the --process-mode=safe-background
command-line argument.

(What do you know? I never knew this was there! One learns something new
every day!)

-- 
|8]


More information about the syslog-ng mailing list