In my /etc/monit/monitrc I have the following lines:

check process foo_server with pidfile /var/run/bwam_server.pid
        start program = "/Users/foo/foo_server.sh start"
        stop program = "/Users/foo/foo_server.sh stop"

check directory foo_data path "/Users/foo/Library/Application Support/foo_server/data"
        if timestamp > 1 minute then alert
        #if timestamp > 1 minute then restart foo_server

I know I shouldn't have some of this stuff in my home directory, but this aside: if I uncomment the last line, Monit tells me syntax error on foo_server -- but I am, as far as I understand, correctly defining the process -- how else do I reference it?

link|improve this question
feedback

1 Answer

add to /Users/foo/foo_server.sh restart action and change config:

 if timestamp > 1 minute then alert
 if timestamp > 1 minute then
       exec "/Users/foo/foo_server.sh restart"
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.