Page 1 of 1

Re: [Nagios-devel] 2.0 Nagios CVS - Service Dependencies Patch

Posted: Tue Apr 20, 2004 9:17 am
by Guest
Ethan,

Sounds good!

One thing I thought about since I submitted the patch. I'm not sure it =
will work with service_group definitions in the dependency like I said =
it would. (We use hostgroups here instead to assign services) If you =
or the list members here are interested, I can write additional =
functionality to handle them also. I don't think it would be a lot more =
work.

-Karl


-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Ethan
Galstad
Sent: Monday, April 19, 2004 9:34 PM
To: [email protected]
Subject: Re: [Nagios-devel] 2.0 Nagios CVS - Service Dependencies Patch
- bug fixes and new features


Hi Karl -

I'm a bit behind on applying some of the patches recently submitted=20
to the list, but hope to have this incorporated into CVS by the end=20
of the week.


On 19 Apr 2004 at 18:28, Mueller, Karl wrote:

> Hello All,
>=20
> I wrote a few weeks ago the list asking some questions about service
> dependencies, because the way they are currently defined, I find them
> very hard to use for our typical needs. A typical example is an
> Oracle SQL check which does something (perhaps checks redo log
> status). It should not run the check if Oracle is down, right?=20
> Service dependencies to the rescue! Unfortunately, if you have a
> large group of host - we have 50 in this group, for example - you
> can't tell Nagios that every Oracle Redo Log check depends on its OWN
> Oracle check without defining 50 service dependencies. That is a
> pain, and we probably have 6 or 7 dependencies on each host on its own
> services, if not more.
>=20
> Instead of writing some kind of configuration script to do this for
> me, I decided to just write a patch to do it. There are two main
> features to the patch:
>=20
> 1) If a "host_name" entry in a servicedependency definition is "SELF"
> (any capitalization), then every host in the host_name, host_group, or
> service_group line will receive a dependency instance against ITSELF
> ONLY with the appropriate service name. An example configs:
>=20
> ####
> #### Depend on 'Oracle' service on our own service
> ####
>=20
>=20
> define servicedependency {
>=20
> use defaults
>=20
> dependent_service_description Oracle Failed Logins
> dependent_hostgroup_name s_prod_oracle
>=20
> service_description Oracle
> host_name SELF
>=20
> }
>=20
> This creates dependencies for every host in "s_prod_oracle" on ITSELF
> for the "Oracle Failed Logins" service on the "Oracle" service. It's
> exactly the same as if you took every host in "s_prod_oracle" and
> defined a servicedependency object with its own host_name in it. ('N'
> objects)
>=20
> 2) Something similar, but slightly different: if you set a new config
> variable "peer_groups", indicating that the two groups you're going to
> specify are "peers" to each other, Nagios will create one to one
> dependencies instead of many to many dependencies. Example:
>=20
>=20
> define servicedependency {
>=20
> use defaults
>=20
> dependent_service_description Oracle Failed Logins
> dependent_hostgroup_name s_prod_oracle
>=20
> service_description Oracle
> host_name s_prod_oracle
>=20
> peer_groups 1
>=20
> }
>=20
> Is functionally equivilant to the first example. If you have:
>=20
> dependent_host_name A, B, C, D
> host_name M, N, O, P
>=20
> Nagios would *normally* create dependencies: "A:M, A:N, A:O, A:P, B:M,
> B:N...", etc.
>=20
> With "peer_groups" enabled, Nagios will now create: "A:M, B:N, C:O,
> D:P" ONLY. =20
>=20
> Of course, with this option set, the number of hosts that are
> eventually resolved from expansion of hostgroup(s)/servicegroup(s)
> MUST BE EQUAL. =20
>=20
> How is this useful? Besides creating "self" dependencies as above
> (which are better handled through 'self'), you can reverse the g

...[email truncated]...


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