Hello,
I configured a monit control file to restart a service in case the service is
stopped accidentally.
check process servicea with pidfile /var/run/servicea.pid
start program = "/tmp/start_service.sh"
stop program = "/tmp/stop_service.sh"
if does not exist then restart
# add connection checking
if failed port 80 type tcp then restart
>From the monit guide, restart action shall call stop, then start program
>defined. If failed to check port, monit did stopped the service, then started
>it. However, in "does not exist" case, only start program was invoked. Is it
>expectable? As I want to send alarm in stop program when detect the service
>has gone, is there another way to trigger both stop and start if restart can't
>do?
Thanks,
Jing
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general