|
From: | Martin Pala |
Subject: | Re: Odd monit configuration help... |
Date: | Fri, 05 Nov 2004 21:32:35 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5 |
1.) monitrc: --8<-- set logfile = syslog set alert address@hidden set httpd port 2812 and use address localhost allow localhost allow monit:monit include /etc/monit/monit.d/* --8<-- >>>NOTE: it is the same as yours<<< 2.) and then monit.d contains files like this - /etc/monit/monit.d/ssh: --8<-- check ssh.sshd with pidfile /var/run/sshd.pid start program "/etc/init.d/ssh start" stop program "/etc/init.d/ssh stop" if failed port 22 protocol ssh then restart if 5 restarts within 5 cycles then timeout mode manual check file ssh.etc.ssh.sshd_config with path /etc/ssh/sshd_config if timestamp changed then exec "/etc/init.d/ssh reload" mode manual check file ssh.usr.sbin.sshd with path /usr/sbin/sshd if timestamp changed then exec "/etc/init.d/ssh restart" mode manual --8<-- >>>NOTE: mode changed to manual => monit is passive on sshd<<< 3.) add following line to /etc/init.d/sshd (symbolic example): --8<-- ... case "$1" in start) /usr/sbin/sshd /usr/bin/monit monitor sshd ;; stop) /usr/bin/monit unmonitor sshd /usr/bin/pkill sshd ;; ... --8<-- >>>NOTE: monitoring enabled => monit will be active on sshd<<< Summary: - monit is started in daemon mode (as usual) - shared configuration defines the services which are not common for all servers in "manual" monitoring mode - rc scripts are modified to enable/disable monitoring when the service is started/stopped Mark Ferlatte wrote:
Hi all, I'm trying to configure monit to do something that perhaps it's not capable of doing, but figured I'd ask here before giving up. I run a reasonably sized cluster of machines (~500), and use monit as a service monitor and restarter. This works well. The problem that I have is that not all machines in the cluster run the same set of services, and the question of "which machine runs which service" changes with some frequency. What I think I want is a way to configure monit so that it knows how to monitor every service we run, but only actually have it care about the services that are running when monit starts up (it starts last in our boot process). This would let me only have one global monit configuration for the entire cluster, and let the computer figure out the local set of things to worry about. Is there are way to do this already that I'm missing? M ------------------------------------------------------------------------ -- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general
[Prev in Thread] | Current Thread | [Next in Thread] |