Page 1 of 1

Template

Posted: Tue Nov 04, 2014 10:26 am
by gravitas
Hi,
Using Nagios XI, is there a way to assign a new template to multiple hosts/services at once?

Re: Template

Posted: Tue Nov 04, 2014 10:29 am
by slansing
Yes, you can apply a template to a hostgroup, so all of the hosts in that group would use it.

Re: Template

Posted: Wed Nov 05, 2014 1:32 pm
by questrad
This is not working if you want to define mandatory parameters in Host/Service via template assigned to Host/Service group
You need to populate those parameters using the Host/Service config itself, or using template but assigned it to Service/Host itself.

Re: Template

Posted: Wed Nov 05, 2014 1:50 pm
by tmcdonald
It actually is not possible to assign a host template to a hostgroup directly. When you set the hostgroup parameter in a host template, you are saying that any host using that template should be in that hostgroup.

Re: Template

Posted: Wed Nov 05, 2014 3:08 pm
by questrad
Correct

Re: Template

Posted: Wed Nov 05, 2014 3:56 pm
by abrist
gravitas wrote:Using Nagios XI, is there a way to assign a new template to multiple hosts/services at once?
Not easily. You can do so through a custom complex sql query among even less accessible methods. If you are going to do a bunch of configuration through templates, my suggestion is get some base templates created and applied to all the objects in some type of logical breakdown so that in the future you can add templates to the pre-existing templates to expand the options pulled in. If you are looking to alter some objects that all share the same xi_wizard_* template, you could always add your new template to the wizard template.