Hi, yes, both start&stop programs are needed for automatic restart action.
The mentioned words 'with' and 'program' are optional "noise" words just to allow construct natural sentence they are not required - see monit manual for complete list. Regards, Martin On Mar 11, 2010, at 2:04 AM, Tim Howe wrote: > 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/myproc.pid > 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/srun.pid > start program = "/usr/local/resin/bin/srun.sh 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? > > --TimH > > > -- > To unsubscribe: > http://lists.nongnu.org/mailman/listinfo/monit-general -- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general
