|Subject:||Re: Conditional services|
|Date:||Fri, 5 Feb 2016 08:44:29 -0500|
How about something like this…
check program server-status with path /usr/local/bin/state.sh
every “5 * * * *"
if status = x then exec /usr/bin/bash -c "/usr/local/bin/foo.sh (x)”
if status = y then exec /usr/bin/bash -c "/usr/local/bin/foo.sh (y)"
‘state.sh” determines the states of your system/application. Monit monitors this state and then routes to the proper endpoint. In foo.sh you can then put whatever logic you want to correspond to your exit code. This can be starting, stopping, pulling from a cluster rotation….
On February 5, 2016 at 5:17:29 AM, Vadym Chepkov (address@hidden) wrote:
|[Prev in Thread]||Current Thread||[Next in Thread]|