Host Groups, Templates, and Contact Inheritance

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
logisbk
Posts: 24
Joined: Mon Nov 08, 2021 1:00 pm

Host Groups, Templates, and Contact Inheritance

Post by logisbk »

I have an XI server with many different host groups and host templates. These templates usually contain a contact and/or contact group. Defined in the template are also Host Groups. I thought that since a template was being applied to a host group, the contacts would also be applied to the host within the host group (assuming standard inheritance and nothing at the host level is overriding the inherited values).

I'm doing some troubleshooting and that doesn't appear to be the case. I found an old forum post from 2013 that states:
The issue comes from the logic of applying a hostgroup to a template, then applying the hosts to the hostgroup and expecting it to inherit.

What is actually happening, the template is told to apply the defined hostgroup to everything that uses the template, not for the hostgroup to inherit checks and settings from the templates. So instead you need to apply the settings such as host groups and other templates the a template, then apply this template directly to the host or service and all groups and other settings will trickle down. Does that make sense, I understand its a tricky topic.
The Template would add the Host to the Host Group, but those hosts don't inherit settings from the Host Template, it would need to be applied direct to the host. Is it not possible then to apply a Host Template to a whole Host Group?
User avatar
kfanselow
Posts: 252
Joined: Tue Aug 31, 2021 3:25 pm

Re: Host Groups, Templates, and Contact Inheritance

Post by kfanselow »

Hi logisbk,

Object Inheritance can be surprisingly complex. You may want to take a look at the sections, "Local Variables vs. Inherited", "Additive Inheritance of String Values" and "Multiple Inheritance Sources" in our document on object inheritance:

https://assets.nagios.com/downloads/nag ... tance.html

If those aren't helpful you may want to open a case with our support team so they can look at your specific configuration and help you sort out how inheritance is working with your environment. It's not always intuitive and they may be able to save you some time and frustration.

https://answerhub.nagios.com/support/s/login/

Thanks and have a great rest of your day !!!
Post Reply