Page 1 of 1

Removing services from specific host

Posted: Tue Jun 27, 2017 9:00 am
by Moshem12
Hey friends, new nagios XI user here.
I associated some services to a template and the template to a hostgroup, and all of the services are ok with all of the hosts under the host group except one server that I need to disable one check for him.
What's the best way to do it without removing the host from the hostgroup and adding the services manually?
Thanks.

Re: Removing services from specific host

Posted: Tue Jun 27, 2017 9:44 am
by mcapra
You would probably have to re-organize your hostgroups. Maybe have some top-level hostgroup be responsible for all contact/notification related items, and some sub-group responsible for the service checks.

I don't know of any way within Nagios Core (and Nagios XI runs Nagios Core under the hood) that you could say "please for this host specifically don't inherit X Y and Z". I think something like that might be planned for Core 5; You might check the GitHub.

Re: Removing services from specific host

Posted: Tue Jun 27, 2017 9:52 am
by Moshem12
mcapra wrote:You would probably have to re-organize your hostgroups. Maybe have some top-level hostgroup be responsible for all contact related items, and some sub-group responsible for the service checks.

I don't know of any way within Nagios Core that you could say "please for this host specifically don't inherit X Y and Z". I think something like that might be planned for Core 5; You might check the GitHub.

Ok I see what you're saying.
I have another question:
What's the nature of the relationship between service templates?
On the UI, I can choose service template for a service template. What's that for?
Capture.PNG

Re: Removing services from specific host

Posted: Tue Jun 27, 2017 3:42 pm
by tgriep
Having the ability to have a template in a template in a template and so on is so you can take advantage of one of the features of Nagios called Object Inheritance.
When the Nagios process starts it looks at the configuration files and the templates and creates the running object out of them.
Using this feature, you can create a template with certain options like a contact group, and another template with different check intervals, and so on.
Doing this, when you edit the lowest template in the chain, it will change all of the objects that have the template applied to it and that will save you time.

Also, you can reuse the same templates in other templates to get the granularity on the options in the checks you need.

You can read about Object Inheritance at the link below.
https://assets.nagios.com/downloads/nag ... tance.html