Page 1 of 1

Problem with "contact additive inheritance"

Posted: Fri Jan 29, 2021 9:28 am
by danjoh
Hi All,

I am having a problem with "contact additive inheritance" in Nagios Core 4.4.6.
This did work at some time and I do not know with witch release it stopped working.
We have a lot of services defined with "contact_groups +<group>" and before this was working fine (adding the group <group> to the list of groups). Now it just replaces the contact_groups with <group>".

Example:

Code: Select all

    define host {
            use                             host-template
            host_name                       testhost
            contact_groups                  group_a
    }
    define service {
            use                             service-defs
            service_description             service1
            host_name                       testhost
            check_command                   check_service1
    }

    define service {
            use                             service-defs
            service_description             service2
            host_name                       testhost
            check_command                   check_service2
            contact_groups                  +group_b
    }
I would expect that for "service1" to have "contact_groups = group_a" and "service2" to have "contact_groups = group_a,group_b", but this is not the case.
The result is that "service2" ONLY have "contact_groups = group_b" (the "+" is ignored).

Or have I misunderstood the use of "+<group>" and it was just luck that it worked before?
Use of "+<contact>" works fine for both Hosts and Services.

There is the https://assets.nagios.com/downloads/nag ... tance.html document,
but it is a bit unclear about 'Implied Inheritance' and 'Additive Inheritance' relations.

Is this behaviour expected or is i a bug?

Regards,