Unfortunately multiple actions in one statement are not supported now, you can
use one of following workarounds:
1.) either call the unmonitor along with exec like this:
if 5 restarts within 5 cycles the exec "/bin/bash -c '/path/to/cool/script
&& /usr/bin/monit unmonitor myservice'"
2.) or specify the timeout action in standalone timeout statement like this:
if 5 restarts within 5 cycles the exec "..."
if 5 restarts within 5 cycles the timeout
Regards,
Martin
On Jun 7, 2011, at 3:05 AM, Michael, Jason wrote:
> I know I can do
>
> If 5 restarts in 5 cycles then timeout
>
> And also
>
> If 5 restarts in 5 cycles then exec "/path/to/cool/script"
>
> But I can't figure out how to do this:
>
> If 5 restarts in 5 cycles then timeout and exec "/path/to/cool/script"
>
> It seems like monit is the logical place to put cleanup scripts for when a
> process can't be restarted. How can I do this?
>
> TIA,
> Jason
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general