monit-general
[Top][All Lists]
Advanced

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

Re: Question about monitrc file.


From: via . lej
Subject: Re: Question about monitrc file.
Date: Mon, 27 Aug 2007 15:46:22 +0200
User-agent: Opera Mail/9.23 (Win32)

I would like to do these step:

As soon as the process is declared as not running (misconfiguration etc...), 
launch the "monit heartbeat stop" command is order to change the active node.

Any idea ?

Thanks,
Vianney

Le Mon, 27 Aug 2007 15:35:32 +0200, Jovan Kostovski <address@hidden> a écrit:

> On 8/27/07, address@hidden <address@hidden> wrote:
>> I had an error with that command line:
>>
>>
>> if 2 restarts within 2 cycles then exec "/usr/sbin/monit heartbeat stop"
>>
>> i get:
>>
>> /etc/monit/monitrc:212: Error: syntax error 'exec "'
>>
>> what is the problem ?
>
> The syntax for this check is :
> IF NUMBER RESTART NUMBER CYCLE(S) THEN TIMEOUT
>
> So the only action you can take after that check is timeout, which
> actually calls the UNMONITOR action which will stop monitoring
> the service. This means if you execute this check you'll have to
> add another check that will test if the service is not running
> and to issue the MONITOR action (run a script monit monitor service_name)
>
> At the moment I can't figure out how to check if process is running (the only
> think I can think of is to check if pid changed, but that will notify
> you that the
> process has been restarted)
> Martin? Jan-Henrik? Any Ideas?
>
>
> Vianney what exactly do you want to achieve? Maybe it can be
> done some other way, some other checks.
>
> BR, Jovan
>
>
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general
>
>






reply via email to

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