On Tue, Jan 17, 2012 at 4:14 PM, Jan-Henrik Haukeland
<address@hidden> wrote:
On Jan 17, 2012, at 6:56 PM, Tyler Yosick wrote:
> I am in need of some help. I am trying to get monit to check a script at a certain time daily. I want to make sure the script completes, and if it doesn't, to output errors to an email or something.
You can use something like this [1]:
check program name_of_test with path /path/to/script.sh
every "* 8 * * 1-5" # Check every workday between 8AM-9AM
if status != 0 then alert
In your script, in case of an error, everything written to stderr will be included in the alert message emitted by Monit.
[1]
See http://mmonit.com/monit/documentation/monit.html#program_status_testing
and http://mmonit.com/monit/documentation/monit.html#service_poll_time
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general