monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: service config


From: Martin Pala
Subject: Re: service config
Date: Fri, 15 Jul 2011 12:25:14 +0200

Hi,

please can you provide more details - what exactly doesn't work? The port test is OK - when it won't accept connection, Monit will restart the service. In the case that the program crashed without cleaning the pidfile as you mentioned, it is no problem - the pidfile will contain PID for which no process exists => it will restart the process.

Please check Monit logs - it is likely that when the process crashed, Monit restarted it and thus the port test passed. You can also run Monit in verbose mode with the -v option to see the details.

Martin


On Jul 15, 2011, at 11:48 AM, Govind wrote:

Hi,

I configured a service like this

check process dpm with pidfile /var/run/dpm.pid
group root
start program = "/etc/init.d/dpm start"
stop program = "/etc/init.d/dpm stop"
if 5 restarts within 5 cycles then timeout


I had segfault, which did not clean up the PID file, so i try checking for port like this
if failed port 5015 then restart
OR
if failed port 5015 type tcp then restart

But none of them work,
the dpm service run as
# netstat -tupln|grep dpm
tcp        0      0 0.0.0.0:5015                0.0.0.0:*                   LISTEN      8628/dpm       

Can  you please advise, if there was anything wrong in above syntax of port checking.

Thanks
Govind
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


reply via email to

[Prev in Thread] Current Thread [Next in Thread]