Page 1 of 1

Host Check alert settings not pulling from template

Posted: Mon Apr 03, 2017 10:40 am
by ahoward12
Hey, I am having an issue where a host will go down and it using the "Notification Interval" from the host and not the host template. One the host the notification interval is set to 5 min, however the Notification enabled is set to skip. I have a Host template on the host which defines the notification interval at 30 minutes, but it is still using interval from the host not the template. This is not the only host I am having the issue with. I have attached my system profile and the host I am currently referring to is "Test".

Appreciate any help

Re: Host Check alert settings not pulling from template

Posted: Mon Apr 03, 2017 1:04 pm
by tgriep
The way object inheritance works in Nagios is that the settings in the Service or Host object supersede the settings from a template, not the other way around.
If you want the settings from the template to be used for a Host or Service object, do not set that option on the object itself, when it is unset in the object, the object will inherit the settings from the template.

Take a look at the link below for more details on how Object Inheritance functions in Nagios.
https://assets.nagios.com/downloads/nag ... tance.html

When you select "skip", the values will be inherited from the template that this object is using so your host check will use the Notification enabled setting from your template and your template has it enabled.
The Skip setting doesn't apply to all of the Notification options on the Alert Tab, Only to the Notification Enabled option.

Re: Host Check alert settings not pulling from template

Posted: Mon Apr 03, 2017 1:08 pm
by ahoward12
Ok, thanks, that makes much more sense. I assumed it was user error on my part. So if I have 200+ hosts, is there a way to blanket them all with a different notification interval without going to each individual host?

Re: Host Check alert settings not pulling from template

Posted: Mon Apr 03, 2017 1:41 pm
by tgriep
The best bet is to use templates and add that template to the objects. I am assuming that you do not want 200+ different Notification intervals so the easiest way is to remove the Notification Interval settings from the host / Service object and add a template to the object with the notification interval you want. Then use that same template on the objects you want the same notification interval setup on.
Another feature is if you change the template, all of the objects the template is applied to get changed all at the same time when the config is applied.

Re: Host Check alert settings not pulling from template

Posted: Mon Apr 03, 2017 1:50 pm
by ahoward12
Ok, so either way I am going to have to touch every host individually to clear out the notification interval line?

Re: Host Check alert settings not pulling from template

Posted: Mon Apr 03, 2017 2:16 pm
by tgriep
If your server has the Enterprise feature, you can use the Bulk Modification Tool from the Core Config Manager menu.
Click the Change a single configuration option button and select the Notification Interval from the Pull down menu.
Leave the value empty, select the hosts and save the settings and Apply the Config. That should clear you that option so you don't have to edit them individually.

Re: Host Check alert settings not pulling from template

Posted: Mon Apr 03, 2017 2:47 pm
by ahoward12
I thought so, I don't have enterprise but I will manage if that is the only way to do it. Thanks for your help, this is resolved, user error!