Apparently, it did not wait a cycle.
I ran with -v. See output at end.
I don't use "every".
gzipper.sh is a short bash script that runs another "daemon" script with
an endless loop in a background process, and writes the PID
of that process in gzipper.pid .
The above logs was spit out with no delay so it is reasonable that the
last "gzipper.pid' does not exist" logs were there just because of timing.
I.e. the daemon was run, the gzipper.pid file was not yet written, but
monit already checked for it without waiting a cycle.
My cycle is 60 seconds.
monit: pidfile '/home/moshe/.monit.pid' does not exist
monit: pidfile '/home/moshe/icpipe/run/gzipper.pid' does not exist
monit: pidfile '/home/moshe/icpipe/run/gzipper.pid' does not exist
'gzipper' start: /home/moshe/icpipe/bin/gzipper.sh
monit: pidfile '/home/moshe/icpipe/run/gzipper.pid' does not exist
monit: pidfile '/home/moshe/icpipe/run/gzipper.pid' does not exist
'gzipper' failed to start
Execution failed notification is sent to address@hidden <mailto:address@hidden>
Starting gzipper:
start gzipping loop
On 11/13/07, *Martin Pala* <address@hidden
<mailto:address@hidden>> wrote:
Please run monit in verbose mode (-v option) and check logs.
Monit currently waits one cycle for the process to start (unless the
"every" option is used). If the process starts slower, then it
reports error. If your testing cycle is short, you can also consider
making in slightly longer.
We plan to support method timeouts in the future:
http://www.tildeslash.com/monit/doc/next.php#38
Martin
On Nov 12, 2007, at 1:02 AM, Moshe Cohen wrote:
> Hi,
> Often when I start a process with Monit, I receive an alert that it
> has failed to start, even though it succeeds.
> My thinking is that Monit is checking the PID file before it is
> created.
> How does Monit time this check ?
>
> Moshe
>
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general
<http://lists.nongnu.org/mailman/listinfo/monit-general>
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
------------------------------------------------------------------------
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general