Re: Check program problem

2012-11-19 Thread Dmitry Zamaruev
Thanks, nice solution, but my service start/stop/restart methods relies on pid file for operations (kill for example) I could write complex /tmp/script.sh, that will not return 1 more times than I need, but this is one layer over simplicity. If there would be no monit-only solution - I will take t

Re: Check program problem

2012-11-19 Thread Eric PAILLEAU
Le 19/11/2012 17:12, Dmitry Zamaruev a écrit : check program with path '/tmp/script.sh' every 2 cycles if status != 0 then exec '/tmp/some_service.sh restart' check program_thread with path '/tmp/script.sh' every 2 cycles if status != 0 then exec '/bin/rm -f /tmp/file.pid' check proces

Re: Check program problem

2012-11-19 Thread Dmitry Zamaruev
Nope, this will just increase poll interval for particular service, so service will be restarted twice, but with increased time between restarts :) Assuming we have some service running with PID=10 (in /tmp/file.pid), and script that checks if process mentioned in /tmp/file.pid have less then 100

Re: Check program problem

2012-11-19 Thread Carina Haupt
Perhaps also a timeout after the start could help. I have this in the definition of my start command. '/tmp/script.sh start' timeout 30 second(s) Ciao Carina On 19.11.2012 16:43, Jan-Henrik Haukeland wrote: I'm not sure I understand the problem, but that does not prevent me from having a sug

Re: Check program problem

2012-11-19 Thread Jan-Henrik Haukeland
I'm not sure I understand the problem, but that does not prevent me from having a suggestion :) I'm wondering if the every statement could help in this situation? As in: check program with path '/tmp/script.sh' every 2 cycles if status != 0 then exec '/tmp/some_service.sh restart' Any luck

Check program problem

2012-11-19 Thread Dmitry Zamaruev
Hi, I'm using 'check program' to monitor thread leak in one of our applications. All is working nice, except that application is always restarted twice. I dig through source code and found that it should be related to how 'check program' is handled. Here is my configuration example: check program