I'm trying to configure Monit to run my script but it's not working.
I'm running Monit 5.3.2 from a Ubuntu 11.2 environment (it's a virtual machine, my machine actually is Windows 7), and for some reason I cannot make the "check program" to work. It always gives the error: Warning: Program is not executable: 'scriptPath'.
Just in case, I tested by copying the example Monit has on the manual (http://mmonit.com/monit/documentation/monit.html) and created the script as the manual, as described below:
check program myscript with path "/usr/local/bin/myscript.sh" if status != 0 then alert
Sample script for the above example (
#!/bin/bash echo test exit $?
Anyway, even with those instructions, I still receive the same error message:
Warning: Program is not executable:
I have no idea what can be happening. Any suggestion is very welcome.