monit-general
[Top][All Lists]
Advanced

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

Re: monitor only when IP address is local


From: Werner Flamme
Subject: Re: monitor only when IP address is local
Date: Tue, 07 Feb 2012 15:18:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120129 Thunderbird/10.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks Martin,

of course, this will work :-) The simplest solution is what I think of
last :-)

But... well, the services are not switched over regularly, but only in
case of havoc :-\ Last time, it was a choking SAN/OCFS2 connection...

The service is our SAP router software, and it runs on the VM where
the Solution Manager is running on. Only in case of really bad
circumstances this VM is shut down and the other VM is used to
continue the service ("Emergency! Do something! And QUICK!", you know
this...). It is almost sure that I will forget to disable the service
on the "bad" platform or to enable it on the "good" one. I'd prefer an
automatic solution because of this ;-)

And I am not allowed to use something like heartbeat/corosyc/... on
these systems.

Regards,
Werner


Martin Pala [07.02.2012 15:06]:
> Hi,
> 
> you can set the monitoring mode to "mode manual" (so the service is
> not monitored by default) and enable/disable the monitoring when
> you migrate the IP address using monit CLI utility ("monit
> unmonitor <servicename>" and "monit monitor <servicename>")
> 
> If you have more active/passive services like this, you can put
> them into service group and monitor/start the whole service group:
> 
> monit -g mygroup monitor
> 
> Regards, Martin
> 
> 
> On Feb 7, 2012, at 2:58 PM, Werner Flamme wrote:
> 
> Hi everyone,
> 
> it's my first post on this mailing list, and I am not very used to 
> monit...
> 
> I have a service that runs on a server with a certain IP address 
> (let's say, 192.168.171.121). But this address can be given
> (manually) to serverA or to serverB. So I only have to check the
> service on that machine that got this address.
> 
> The check itself is not hard to do, but how can I "unmonitor" when
> the host where monit is running on does not have this certain IP
> address?
> 
> To check if the host has the address, I can use something like
> 
> HAS_IP=0 /sbin/ifconfig | /usr/bin/grep -q '192.168.171.121' &&
> HAS_IP=1 if [ $HAS_IP -eq 1  ]; then ... #/* monitor the service
> */
> 
> If all else fails, I have to include some code like this in 
> /etc/init.d/monit to prevent monit from starting :-(
> 
> Regards, Werner
>> 
>> -- To unsubscribe: 
>> https://lists.nongnu.org/mailman/listinfo/monit-general
> 
> 
> -- To unsubscribe: 
> https://lists.nongnu.org/mailman/listinfo/monit-general

- -- 
Werner Flamme, Abt. WKDV
Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
Helmholtz Centre for Environmental Research - UFZ
Permoserstr. 15 - 04318 Leipzig / Germany
Tel./phone: +49 341 235-1921 - Fax +49 341 235-451921
Information nach §§ 37a HGB, 35a GmbHG:
Sitz der Gesellschaft: Leipzig
Registergericht: Amtsgericht Leipzig, Handelsregister Nr. B 4703
Vorsitzender des Aufsichtsrats: MinDirig Wilfried Kraus
Wissenschaftlicher Geschäftsführer: Prof. Dr. Georg Teutsch
(Scientific Managing Director)
Administrative Geschäftsführerin: Dr. Heike Graßmann
(Administrative Managing Director)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8xMp8ACgkQk33Krq8b42PlMwCfSlPAcJZ0nc66zYtTdnQVHrS6
+j4An03OHsrIcFTRPG801D3hF+52Hmg6
=qPZF
-----END PGP SIGNATURE-----



reply via email to

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