My monit script works to detect an outage with a process and inform me when the rule is:
IF DOES NOT EXIST THEN ALERT
My monit script works to detect an outage and automatically fix it when the rule is:
IF DOES NOT EXIST THEN START
But, what I want it to do is inform me AND fix it.
Two rules in a row seems to make it ignore all but the last:
IF DOES NOT EXIST THEN ALERT
IF DOES NOT EXIST THEN START
# No alert given.
I could use a custom script that does both, and
IF DOES NOT EXIST THEN EXEC "my_handwritten_script"
but I was trying to move away from a mess of hand-written scripts towards a clean Monit configuration.
Can I configure Monit to take two actions?