Host template not applying to additional onboarded hosts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mrjsokol
Posts: 109
Joined: Thu Apr 16, 2020 10:27 am

Host template not applying to additional onboarded hosts

Post by mrjsokol »

When making a host template and then applying the host template changes to the new host, the host settings would not change? Is this the intended use of the host template? If not, how would I do an application of host settings to multiples hosts?
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Host template not applying to additional onboarded hosts

Post by jbrunkow »

Yes, I believe that changes made to a host template should also be made to the objects using that template.

Code: Select all

locally defined variables override variables that would normally be inherited from a template object
However, some variables override others. To see exactly what is happening, I may have to take a look at your entire configuration.

You may want to take a close look at our document about inheritance for a more detailed explanation of how this works.
Object Inheritance With Templates

If you want me to take a look at your configuration, then please send me your system profile. You can download the profile by navigating to System Profile under System Config on the left pane > and clicking the Download Profile button on that page.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
mrjsokol
Posts: 109
Joined: Thu Apr 16, 2020 10:27 am

Re: Host template not applying to additional onboarded hosts

Post by mrjsokol »

I had pm'ed you the profile but wasnt able to post to this post at the same time. Were you able to get it ?
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Host template not applying to additional onboarded hosts

Post by jbrunkow »

Yes, I received the profile. Thank you for sending that.

Which host are you trying to apply the template to?

I see from your configuration that you are using the Wizards to set this up. It is possible that the template from the Wizard is overwriting the other one that you want to apply. One way to get around this would be to use the Bulk Modification Tool instead. The other way would be to change the precedence of the templates so that the correct attributes are applied to the object.

Bulk Modification Tool
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
mrjsokol
Posts: 109
Joined: Thu Apr 16, 2020 10:27 am

Re: Host template not applying to additional onboarded hosts

Post by mrjsokol »

Hello,

I was applying a modified version of passive to Lab 03 but did not take the additional settings inside the host itself. The bulk modification tools is available to the enterprise version of XI only and do not have access to that. Should applying a host template to a host change the settings within a host?
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Host template not applying to additional onboarded hosts

Post by jbrunkow »

Yes, hosts inherit configuration from the templates applied to them. The document linked below explains exactly how this relationship works.
Object Inheritance With Templates

Another thing to keep in mind is that some configurations take precedence over others, meaning that some can overrule or overwrite others. That may be the source of our confusion here. Keep in mind that the Wizard applies its own template, and settings can be overwritten by local ones.

Have a look in the following folder to see exactly how the configuration exists in XI.

Code: Select all

/usr/local/nagios/etc
Once the new configuration has been applied, the objects.cache file will show the final settings from the templates. This is helpful for troubleshooting.

Code: Select all

/usr/local/nagios/var/objects.cache
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked