[Top][All Lists]

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

Monit can't find my processes!

From: Mark Mellar
Subject: Monit can't find my processes!
Date: Thu, 19 Nov 2015 14:58:40 +0000
User-agent: Microsoft-MacOutlook/

Hi folks, 

I was wondering if someone here might be able to help me out with my current monit problem. I’ve dug through the docs and I can’t seem to find what I’m doing wrong.

I’ve thrown together a small test script for monit to monitor…




/bin/echo -n $$ > $FOOPID

echo 'restarting with '$$' as pid' >> $FOODATES



while true


    date >> $FOODATES

    cat $FOOPID >> $FOODATES 2>&1

    sleep 3


 … and a monitrc file to go with it …

#!/usr/bin/monit -c

set daemon 10                   # interval between polls, in seconds

set logfile "/tmp/monitlog.log"

set pidfile "/tmp/"

set statefile "/tmp/monitstate.state"

set mailserver <REDACTED>

set alert address@hidden

set httpd port 2812

    allow localhost


check process test with pidfile /Users/marmel01/Documents/

      start program = "/Users/marmel01/Documents/"

      stop program = "/bin/kill $(/bin/cat /Users/marmel01/Documents/”

However, when I run, while the script seems to be executing perfectly well, monit won’t seem to recognise the fact!

Here’s an excerpt form monit’s log

[GMT Nov 19 12:39:30] info     : Monit daemon with PID 75079 awakened

[GMT Nov 19 12:39:53] error    : 'test' failed to start (exit status -1) -- Program /Users/marmel01/Documents/ timed out

[GMT Nov 19 12:39:53] info     : Awakened by User defined signal 1

[GMT Nov 19 12:39:53] info     : 'test' monitor action failed

[GMT Nov 19 12:39:53] error    : 'test' process is not running

[GMT Nov 19 12:39:53] info     : 'test' trying to restart

[GMT Nov 19 12:39:53] info     : 'test' start: /Users/marmel01/Documents/

[GMT Nov 19 12:40:23] error    : 'test' failed to start (exit status -1) -- Program /Users/marmel01/Documents/ timed out

[GMT Nov 19 12:40:33] error    : 'test' process is not running

The pid file appears to be where it should be and is readable. I don’t know where to go from here.

I’m running the latest version of monit on Darwin.

Any help would be greatly appreciated!


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

reply via email to

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