[Top][All Lists]

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

[monit] check process restart not start?

From: Tim Howe
Subject: [monit] check process restart not start?
Date: Wed, 10 Mar 2010 17:04:54 -0800

So, bear with me as this is my first attempt, but I think the documentation may
not be correct..

I have a statement like so:

check process myproc with pidfile /var/run/
  start program = "/usr/local/etc/rc.d/myproc start"

When I kill the process to test monit, it does not start it but instead gives
this message in the logs:

    monit: Start or stop method not defined -- process myproc.

If I add a "stop program" line it works.  It seems this is because it is
actually trying to "restart" not just "start" the process.  However, there is
an example in the docs like so:

 check process resin with pidfile /usr/local/resin/
    start program = "/usr/local/resin/bin/ start"

Which is pretty much what I am doing.

Also, in the docs it says:
       "1. CHECK PROCESS <unique name> PIDFILE <path>
           <path> is the absolute path to the program's pidfile. If the pid-
           file does not exist or does not contain the pid number of a running
           process, Monit will call the entry's start method if defined, If
           Monit runs in passive mode or the start methods is not defined,
           Monit will just send alerts on errors."

Which also suggests that only a start method needs to be defined.  The word
"with" is also missing from that paragraph -- is it not needed or is that a
typo?  I also see examples where "start" seems to be interchangable with "start
program"; are these different things?

I am using monit 5.1.1.  Is this a bug or am I blind to some syntax I don't get?


reply via email to

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