monit-general
[Top][All Lists]
Advanced

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

Re: Check program problem


From: Dmitry Zamaruev
Subject: Re: Check program problem
Date: Mon, 19 Nov 2012 18:41:25 +0200

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 this way  

On Mon, Nov 19, 2012 at 6:31 PM, Eric PAILLEAU <address@hidden> wrote:
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 process program with pidfile /tmp/file.pid
        start = "/tmp/some_service.sh start'"
        stop  = "/tmp/some_service.sh stop'"
        if 5 restarts within 5 cycles then timeout


--


reply via email to

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