[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with a Check

From: Tyler Yosick
Subject: Re: Help with a Check
Date: Tue, 17 Jan 2012 16:44:44 -0500

Wow. Thank you so much for emailing me back! I didn't expect a response that quickly. In response to your reply:

I tried this in the monitrc file:

"check program mri_script with path /home/twapp/scripts/mri_song_
block.php every "* 8 * * 1-5" # Check every workday between 8AM-9AM
  if status != 0 then alert"

But when trying to start monit after editing the config file, I get this error: "/etc/monit/monitrc:13: Error: syntax error 'mri_script'"

It shouldn't matter what the check name is right?

If this helps, the script I am trying to monitor runs once a day and is a php script. (not sure if php makes a big difference or not)

Any thoughts?

On Tue, Jan 17, 2012 at 4:23 PM, Martin Pala <address@hidden> wrote:

the example of monit configuration is in monit manual (, e.g.:

check program myscript with path "/usr/local/bin/" every "* 8-19 * * *"
if status != 0 then alert

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:

echo "Hello world"
exit 0


On Jan 17, 2012, at 7:18 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.

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.



Tyler Yosick
TuneWiki Operations

To unsubscribe:


Tyler Yosick
TuneWiki Operations

reply via email to

[Prev in Thread] Current Thread [Next in Thread]