Re: [Nagios-devel] Service dependencies

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Service dependencies

Post by Guest »

Sorry to bring up an old thread, but there were no follow up on this. I
just find myself in the same situation (need one-to one mapping for
every hosts) and remembered this old thread.

How hard would if be to add a flag in servicedependency definitions that
force every service dependency to reside on the same host, and ignore
missing services.

So I could write something like this:

define servicedependency {
hostgroup_name pool1,pool2
service_description Master service
dependent_hostgroup_name pool1,pool2
dependent_service_description Slave 1,Slave 2,Slave 3
same_host_dependency 1
notification_failure_criteria c,u
}

And I'd get:
1: dependencies across services on the same host for every hosts defined
in pool1 and pool2
2: missing dependent services would be silently dropped.

Or to be more flexible different values for same_host_dependency could
determine if Nagios does #1 or #1 & #2.

If you don't like #2, doing #1 would already reduce significantly the
config required.

I never checked the pre-flight code, but I'd assume it shouldn't be that
hard. I guess all you have to do is skip dependency creation on
conditional statements.

Thanks,

Thomas

> -----Original Message-----
> From: [email protected] [mailto:nagios-devel-
> [email protected]] On Behalf Of Thomas Sluyter
> Sent: Monday, June 12, 2006 5:58
> To: Nagios-Devel
> Subject: Re: [Nagios-devel] Service dependencies
>=20
> I'm sorry if this is the second time this message gets sent to the
> list. I had a hunch that it didn't make it the first time I sent it...
>=20
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> Hi all.
>=20
> I was actually wondering about the exact same thing Dirk was thinking
> about! Such a shortcut would really help out in easing the use of
> dependencies.
>=20
> > Try this...
> >
> > define servicedependency{
> > hostgroup_name windows-servers
> > service_description NRPE_NT
> > dependent_hostgroup_name windows-servers
> > dependent_service_description Drive_C
> > }
>=20
> Ethan's solution wouldn't work if you look at it logically. Why?
> Because you're telling Nagios that:
> * All instances of service A in hostgroup X
> * Depend on all instances of service B in hostgroup X.
>=20
> Meaning that all instances of A will "fail" if -any- instance of B
> goes down. That's not what we want to happen, is it? :p
>=20
> Or am I completely off on this? Might be that I'm not reading this
> correctly.
>=20
> As Dirk said: it would be great if there was some shortcut for
> telling Nagios that you want all instances of service A in hostgroup
> X to be dependant of service B on -their-own- host. That way you
> could take care of all dependencies for a whole hostgroup in a matter
> of a few dozen lines of code.
>=20
>=20
> - Thomas Sluyter (Cailin)
>=20
> -----------------------
> This thread is located in the archive at this URL:
> http://www.nagiosexchange.org/nagios-devel.33.0.html?
> &tx_maillisttofaq_pi1[showUid]=3D18830
>=20
>=20
>=20
> _______________________________________________
> Nagios-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/lis ... gios-devel





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked