monit-general
[Top][All Lists]
Advanced

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

Re: [monit] Executing a if statement based on another process


From: Martin Pala
Subject: Re: [monit] Executing a if statement based on another process
Date: Tue, 29 Apr 2008 22:10:11 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080313 Iceape/1.1.9 (Debian-1.1.9-2)

You can for example suspend the mythtv monitoring before starting the mythfilldatabase this way:

  monit unmonitor mythtv

and after mythfilldatabase finished, you can run:


  monit monitor mythtv

which will enable the monitoring again.


The above commands can be added to the script which starts/stops the mythfilldatabase.


If you want to keep monitoring the mythtv when mythfilldatabase. is running and suspend just the port monitoring, you can move the 'if failed port' statement to standalone service check like for example this:

  check host mythtv_6544 with address 127.0.0.1
    if failed port 6544 proto http then restart
    depends on mythtv

and use the above trick to suspend monitoring of this service while mythfilldatabase is running.



Martin




John wrote:
Hello,

I'm using monit to control my mythtv backend program. The only problem I have 
is when mythfilldatabase is running the 6544 port is blocked. Since I have an 
if statement to check this port to control the process, when mythfilldatabase 
is running monti thinks that the backend has stopped thus it keeps restarting 
the backend while mythfilldatabase is running.

Here's the if statement

if failed port 6544 proto http then restart
if 10 restarts within 15 cycles then timeout

How can I suspend the if failed statement when mythfilldatabase is running?

Thanks


      
____________________________________________________________________________________
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


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




reply via email to

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