Hello,
Please verify that this program returns (exit or fork).
if not monit will fail in timeout waiting for the program return code (0 = OK or 
<>0 = KO).

(simply launch it in a shell and see if it give you the prompt or not.)

if not you have to background it  directly (ending &) or wrapping it in a 
script.
Note : A direct ending '&' make the timeout statement useless as it returns 
immediately. :>)

When using a pidfile monitoring, timeout is not very usefull while
it is in networking test  (icmp, http , etc...)

hope that can help another time.

Best regards.

Le 15/06/2010 06:58, Alexander Sviridov a écrit :

On 14.06.2010, at 12:06, Eric Pailleau wrote:

Hi,
When launched, no environnement variables come with.
It is a very common issue in monit.

I guess monit autors may highlight this a bit more in documentation.

you have to load your env by doing a
program = "/bin/su - user -c '/usr/local/bin/ruby ... ' "

Hope that can help.


It did helped, thank you very much! Now monit starts my scripts.

However, there is a little problem still: I'm getting "Timeout" in monit
summary.

$ monit summary
The Monit daemon 5.1.1 uptime: 3d 11h 40m

Process 'delayed_job' Timeout

$ cat monitrc | grep pidfile
check process delayed_job with pidfile
"/sites/mysite/shared/pids/delayed_job.pid"

$ ps aux | grep `cat /sites/mysite/shared/pids/delayed_job.pid`
25823 0.2 1.1 246668 141412 ? S 08:31 0:02 delayed_job
26953 0.0 0.0 7232 836 pts/1 R+ 08:51 0:00 grep 25823

What could cause such a behavior?



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to