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

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8xLg0ACgkQk33Krq8b42OhpQCfdVy/tB4eMsrTnWiqydbM1MZ+
ZrMAn15ZGF69FSsY4Bjsj+awP8hw4tSg
=H4TO
-----END PGP SIGNATURE-----

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

Reply via email to