Implied/Additive inheritance

Gius, Mark mgius at createspace.com
Fri Jul 9 18:41:47 CEST 2010



> -----Original Message-----
> From: John Moody [mailto:john at moodysrus.com]
> Sent: Thursday, July 08, 2010 5:22 PM
> To: nagios-devel at lists.sourceforge.net
> Subject: Re: [Nagios-devel] Implied/Additive inheritance
> 
> Gius, Mark <mgius <at> createspace.com> writes:
> 
> >
> > Although the documentation does not make this clear, implied and
> additive
> inheritance applies to many
> > other objects and directives.  I'm personally using it on hostgroups,
> contact_groups, contacts,
> > service_groups, etc.  I believe that any directive that can be
> defined as a
> series of comma-delimited
> > strings will support the additive/implied inheritance syntax,
> although I would
> confirm on anything I
> > didn't mention previously, since I don't know for sure.
> >
> > -Gius
> >
> > > -----Original Message-----
> > > From: Thomas Guyot-Sionnest [mailto:dermoth <at> aei.ca]
> > > Sent: Thursday, July 08, 2010 4:26 AM
> > > To: nagios-devel <at> lists.sourceforge.net
> > > Subject: Re: [Nagios-devel] Implied/Additive inheritance
> > >
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > On 10-07-08 05:44 AM, john <at> moodysrus.com wrote:
> > > > Hey Team,
> > > >
> > > >
> > > >
> > > > I am having trouble combining 'Implied' and 'Additive'
> inheritance
> > > for
> > > > normal service notifications.  The documentation implies the
> ability
> > > to
> > > > combine 'Implied' with 'Additive' inheritance is restricted to
> > > > escalations, is this correct?  If so, can I suggest this **very**
> > > > powerful option be expanded to work with normal service
> > > notifications?
> > > >
> > > >
> > > >
> > > > The scenario is the primary contact_group ('+support_team' for
> > > example)
> > > > is set at the host level.  This group is nicely inherited by all
> the
> > > > services on that host (very cool).  If we add a contact_group
> > > > ('+developers' for example) to an individual service on that
> host,
> > > the
> > > > primary_contact group information is overridden, and only the
> > > > 'developers' are contacted.
> > >
> > > +1... I have the same issue and I reported it a while ago. I don't
> > > think
> > > the fix would be so hard, but I haven't had the time to really look
> > > into it.
> > >
> > > FWIW I also suggested generric templates, because some of my
> additive
> > > templates contains instructions that can be used at multiple places
> (ex
> > > hostgroups that can be added to service templates, service
> > > dependencies,
> > > etc.
> > > http://ideas.nagios.org/a/dtd/18864-3955
> > >
> > >
> > > - --
> > > Thomas
> 
> Thanks guys for the quick responses!!  I have thrown in an example
> below (partly
> stolen from the docs) to clarify the issue (my written example may not
> have been
> clear).
> 
> define host{
> 	name 		        linux-server
> 	contact_groups	        linux-admins
> 	...
> 	}
> 
> define service{
> 	host_name		linux-server
> 	contact_groups	        +management
> 	...
> 	}
> 
> This results in only the 'management' team receiving notifications but
> the
> implied/additive *does* work as advertised for escalations.  I am
> attempting to
> leverage the escalation function as a work around at present, but it's
> not
> pretty.
> 
> cheers
> 

Ah, I misunderstood what you were trying to do.  I see the same behavior, where a contact_group defined by the host is not picked up by the service.  It appears as though implied/additive is a behavior specific to escalations.

I just verified that the additive inheritance works for service uses service on contact_groups, so you may be able to get something to work there (it wouldn't be clean though).  Alternatively, if you set contacts (not contact_groups) on a host, when you add contact_groups to the services, those default contacts will _not_ be overwritten.  You'll then have to specify contacts null anywhere you really don't want the default contacts specified in the host to be notified.

And as another alternative, our configs only make use of the default contact for hosts/services as a failsafe.  We use a number of "notify-team" templates and apply those to the correct services and service-templates.  This has worked well for us. 

-Gius

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first




More information about the Developers mailing list