monit-general
[Top][All Lists]
Advanced

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

[no subject]


From: jing ping
Subject:
Date: Tue, 17 Apr 2012 16:45:05 +0800

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
 

reply via email to

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