Nagios implied and additive inheritance; possible bug?

William Leibzon william at leibzon.org
Wed Mar 28 19:19:07 CEST 2012


Additive inheritance will work for objects where original list came
from a template specified with use for that object. So if you had a
contacts list in a template inherited by linux-server than new
management contact would have been added to those specified there.

Allowing use of contacts for hosts when no contact is specified in
service is actually a fairly recent feature - before you had to always
specify contact for service, it works different as then contacts are
decided at the time when notification needs to be sent. I agree that
what you want is also useful and should be added some time later, its
not a bug though - its a new feature request.

What you want to do can be done with templates as per above, but
you'll need to change to specifying contacts for each service as
everyone did before. It can also be done with a new contact group for
that service that would inherit contacts from original list and add
management.

On Wed, Mar 28, 2012 at 9:44 AM, Jim Winkle <jwinkle at doit.wisc.edu> wrote:
> I'd like to set up Nagios contact_groups in the following way (but it's not
> working as expected):
> 1) In general, contact_groups for a host are notified about problems with the
> host and any service on the host.
> 2) Occasionally, we'd like other contact_groups to be notified about problems
> with certain services on the host.
>
> If I'm understanding the documentation at
> http://nagios.sourceforge.net/docs/nagioscore/3/en/objectinheritance.html
> correctly (I'm running (3.3.1), it indicates that #1 can be done using implied
> inheritance and #2 by using additive inheritance, but it's not working as
> expected.  I've found other posts from people with the same issue, but never any
> resolution.
>
> For example, if I define:
>
> define host{
>        host_name               linux-server
>        contact_groups          linux-admins
>        ...
>        }
>
> define service{
>        host_name               linux-server
>        service_description     l_proc_sshd
>        contact_groups          +management
>        ...
>        }
>
>
> I would like this to be equivalent to:
>
> define service{
>        host_name               linux-server
>        service_description     l_proc_sshd
>        contact_groups          linux-admins,management
>        ...
>        }
>
> But instead, the implied inheritance of "linux-admins" is ignored, and it's
> equivalent to:
>
> define service{
>        host_name               linux-server
>        service_description     l_proc_sshd
>        contact_groups          management
>        ...
>        }
>
> So contact_groups is overwritten rather than added to.  No warnings/errors were
> generated about the plus sign being used inappropriately or anything else.
>
> Am I misunderstanding the documentation?  Is this possibly a bug?
>
> If this is not the way it's intended to work, could Nagios be easily enhanced to
> support this?  It seems very logical and powerful, and apparently other people
> are thinking along the same lines as I am.  I posted this on the nagios-users
> list where people confirmed that it doesn't work for them, either.  They
> suggested a workaround using escalations, but it seems like that's a more
> complicated solution and less logical (there are no escalations happening, just
> regular notifications).
>
> Thanks in advance for any light you can shed on this!
>
> -- Jim
>
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure




More information about the Developers mailing list