monit-general
[Top][All Lists]
Advanced

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

Re: [monit] 'flag' files


From: Martin Pala
Subject: Re: [monit] 'flag' files
Date: Fri, 30 Jan 2009 19:04:15 +0100

You can unmoninor the service and enable monitoring again.

Example:

  monit unmonitor myservice

... to enable monitoring again:

  monit monitor myservice

Martin


On Jan 30, 2009, at 6:39 PM, BuraphaLinux Server wrote:

I have a daemon that sometimes needs to be down once in a while.

In my pre-monit days, my custom rc scripts would leave a 'flag' file
in /var/tmp for the accepted down time (and remove it when restarting
the server) and my custom watchdog script had logic like this:

if server is down
  if flag file exists
do nothing (since flag file exists, and we down for an ok reason)
  else
      attempt to bring up server (since we are down Unexpectedly)
  endif
endif

I'm sure that is simple in monit, but after reading all the examples
on the man page and the FAQ, I cannot figure out how to do this.
Probably I'm just dense.  Do people just modify the monit
configuration file 'live' instead of using flag files?  The 'ok'
downtime is on the order of 15 minutes or so, but doesn't happen on a
regular schedule.

I tried to search in the mailing list archives, but I haven't found a
working search string.

Just using the pid file missing doesn't work, since it goes away for
both scheduled and non-scheduled daemon outages.

If you flame, please also provide a link to the solution.


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





reply via email to

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