Service dependancy - circular execution

Thomas Guyot-Sionnest thomas at zango.com
Tue Sep 18 17:34:07 CEST 2007


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

Ints wrote:
> Hi!
> 
> I noticed that it's not possible for 2 hosts to have depend on the same
> service on each other, but it's troublesome as I don't want to have it
> notify if the service is running on 1 of the hosts, here's an example:
> define servicedependency{
>         host_name                       server0
>         dependent_host_name             server1
>         dependent_service_description   service0
>         service_description             service0
>         inherits_parent                 0
>         execution_failure_criteria      n
>         notification_failure_criteria   o
>         }
> define servicedependency{
>         host_name                       server1
>         dependent_host_name             server0
>         dependent_service_description   service0
>         service_description             service0
>         inherits_parent                 0
>         execution_failure_criteria      n
>         notification_failure_criteria   o
>         }
> Basically, the service must run on 1 of the servers, it'll NEVER run on
> both at the same time and while it's running on 1 but not on the other,
> I don't want to have notifies sent for the service not running on one of
> the hosts. I understand why it could result in a deadlock, but it won't
> in my case, so unless there's some hidden option to bypass this security
> error (which I haven't found in 3.0b1) I'd like to have such an option
> for servicedependancy.

There's a check_cluster in the latest Nagios-plugins distribution that
will allow you to do what you want.

1. Disable notifications for your services (Ex:"notification_options n")
2. Create a check_cluster checkcommand and service and use the
$SERVICESTATEID:host_name:service_description$ macros to fill-in the
service status.

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG7+/v6dZ+Kt5BchYRAoXYAKCpAe6Fjykr796rAR+wE+elyQmkVwCcD8EK
prsk0TwrmBrtFGANvq4a65c=
=M4B/
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/




More information about the Developers mailing list