Sometimes, it's useful not to send alert via email, but to act directly on service state, for example send SMS or instant message. With
exec action it is not achievable, because, it only acts on fault and not on service restoration. Thinking about this problem, I thought it would be useful to have special URLs in place of emails to use as alert targets.
For example, to define
alert exec:/root/sms-script.py and when any event is happened, instead of sending email, script
/root/sms-script.py is executed with MONIT_ env variables.
This will spare people from writing email2sms, email2whatsever gateways. Also, this remove complicated SMTP system from alert path. And will simplify coding, as no need to parse message, but just use well defined env variables. (You could also add env variable to signal this is failure or restoration event.)