monit-general
[Top][All Lists]
Advanced

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

conditional service start or stop


From: Lawrence, Wayne
Subject: conditional service start or stop
Date: Mon, 12 Dec 2011 12:36:00 +0000

Hi,
 
I was wondering if there was a way to configure monit to start a different service based on a failure event.
 
I have 2 configs for httpd on my server one for the website and one for maintenance.
 
If the main website configuration failed to restart for example 3 times in 5 cycles I would like to stop the services that are connected to it and bring up the maintenance configuration instead. Ideally i would like to stop a group of services as defined in the monitrc and start another.
 
I know you can do exec statements the achieve this but was wondering if calling monit commands from within the monitrc would be problematic or if it there was a simple way within moint to achieve this.
 
Regards
 
Wayne
 
 
 
 

reply via email to

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