[Top][All Lists]

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

Re: Time of Day exclusion?

From: Christopher P. Lindsey
Subject: Re: Time of Day exclusion?
Date: Thu, 20 Apr 2006 10:29:11 -0500
User-agent: Mutt/1.5.10i

> I think if it was me, I'd just modify the backup script to make the
> appropriate 'monit unmonitor' call before it starts, and 'monit monitor'
> when it finishes.  (Or, if you don't necessarily trust the backup script
> to always finish cleanly, just add cron jobs for 11:59pm and 12:04am to
> do the same.)

I've always wanted time-based exclusion capabilities as well.  I'm not
too keen on running the monit httpd daemon -- I try to limit the number
of port-based services running on my systems.  That removes unmonitor/monitor
as options for me.

What I've ended up doing is modifying my monitrc file via cron to comment
out the appropriate section(s) using chgrep, like

   chgrep 'INCLUDE "/etc/monit/ntpd.monitrc"' '#INCLUDE 
"/etc/monit/ntpd.monitrc"' /etc/monit/monitrc ; killall monit

Note that I run monit out of init, so the killall essentially restarts it.

chgrep is a great tool.  If you don't have it, you can find it at


reply via email to

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