How to execute a script as last step, when monit timeout a service?
My config looks like this:
check process php5-fpm with pidfile /var/run/php5-fpm.pid
start program = "/usr/sbin/service php5-fpm start"
stop program = "/usr/sbin/service php5-fpm stop"
if failed unixsocket /var/run/php5-fpm.sock then restart
if 3 restarts within 5 cycles then timeout
There is an option to send an email on timeout like this
alert address@hostname only on { timeout }
but how to execute a script, to e.g. send a SMS, on timeout?