|
From: | Tyler Yosick |
Subject: | Re: Help with a Check |
Date: | Tue, 17 Jan 2012 16:44:44 -0500 |
Hello,the example of monit configuration is in monit manual (http://www.mmonit.com/monit/documentation/monit.html#program_status_testing), e.g.:--8<--check program myscript with path "/usr/local/bin/myscript.sh" every "* 8-19 * * *"if status != 0 then alert--8<--
If the script won't complete (timeout), monit will report error. If the exit status will be different then 0, monit will report the error along with the error output from the script.Simple script example:--8<--#!/bin/bashecho "Hello world"exit 0--8<--Regards,MartinOn Jan 17, 2012, at 7:18 PM, Tyler Yosick wrote:Hello,
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.
I read this on your site: Monit can be used to test programs or scripts at certain times, much like cron, but in addition, you can test the exit value of a program and perform an action or send an alert if the exit value indicate an error. This means that you can use Monit to perform any type of check you can write a script for.
I just didn't see any examples of how to specify times. Please help.
Thanks
--
Tyler Yosick
TuneWiki Operations
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
[Prev in Thread] | Current Thread | [Next in Thread] |