|Subject:||Monit can't find my processes!|
|Date:||Thu, 19 Nov 2015 14:58:40 +0000|
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
ls -l $FOOPID >> $FOODATES
cat $FOOPID >> $FOODATES
date >> $FOODATES
cat $FOOPID >> $FOODATES 2>&1
… and a monitrc file to go with it …
set daemon 10 # interval between polls, in seconds
set logfile "/tmp/monitlog.log"
set pidfile "/tmp/monitpid.pid"
set statefile "/tmp/monitstate.state"
set mailserver <REDACTED>
set alert address@hidden
set httpd port 2812
check process test with pidfile /Users/marmel01/Documents/foo.pid
start program = "/Users/marmel01/Documents/monittest.sh"
stop program = "/bin/kill $(/bin/cat /Users/marmel01/Documents/foo.pid)”
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/monittest.sh 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/monittest.sh
[GMT Nov 19 12:40:23] error : 'test' failed to start (exit status -1) -- Program /Users/marmel01/Documents/monittesh.sh 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.
|[Prev in Thread]||Current Thread||[Next in Thread]|