I'm just toying around with monit, and I'm hesitant to give it full control 
just yet.

I want to configure monit to restart a crashed daemon, but not to try to start 
one just because none is running yet.

ie If there's a pid file from normal init.d startup, but no process, something probably crashed, restart.

If there's no pid file, just sit tight.


I was hoping to do this by depend-chaining a file check and a process check, 
but it doesn't appear to be working..

----------------------------------------------------------
check process apache with pidfile /var/run/httpd.pid
 depends on apache_pidfile
 start program = "/tools/apachectl.sh start"
 stop program  = "/tools/apachectl.sh stop"
if 3 restarts within 5 cycles then timeout group server

check file apache_pidfile with path /var/run/httpd.pid
 #start program = "/bin/false"
 mode passive
 group server

----------------------------------------------------------

This will identify that 'apache_pidfile' file doesn't exist , but it still trys to restart apache. 'apache' trying to restart
It seems the depend chain logic may not be working?

Or I was also search for a 'missing' type keyword.

ie:
check file apache_pidfile with path /var/run/httpd.pid
if missing unmonitor

Or something like that.

Thoughts??

This is monit version 4.8.1

Thanks,

Joel Krauska




--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to