monit-general
[Top][All Lists]
Advanced

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

Re: Time of Day exclusion?


From: lists lists
Subject: Re: Time of Day exclusion?
Date: Thu, 27 Apr 2006 15:18:56 -0400

Hi, maybe I missed part of the conversation or something here, but why
would not using the httpd remove the monitor/unmonitor options? Those
are/can be command-line driven, correct? 

monit unmonitor [service name] 
monit monitor [service name]

couldn't you go a step further and even create a service that monitors
without alert or with a new processor threshold? , and turn the first
one off, and then the second one(non-alert) on during the backup?




>>> address@hidden 04/20/06 11:29AM >>>
> 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 

   http://freshmeat.net/projects/chgrep/ 

Chris


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







reply via email to

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