Running Monit 5.2.5 on Fedora 15
All standard alerts are working, however just cannot get exec to run anything.
I have tried more than ten different configurations based on examples from the Monit Wiki. None of the exec commands do anything. Below is just one simple examples in an attempt to get 'something' working:
check process tomcat6 with pidfile /var/run/tomcat6.pid start program = "/etc/init.d/tomcat6 start" stop program = "/etc/init.d/tomcat6 stop" if failed host localhost port 8080 then exec "/bin/bash -c '/bin/touch /tmp/monittest'"
If I shutdown Tomcat an alert is sent and the service restarts. However whatever I try in exec is always ignored.
I understand that Monit is very restrictive in terms of its environment and is limited to directories such as /bin and/sbin/. Therefore all the example I have tried have been restricted to these directories. But still nothing.
Anyone any ideas?
p.s. I have turned on verbose logging and no clues in the log file.