Template

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gravitas
Posts: 27
Joined: Wed May 21, 2014 9:18 am

Template

Post by gravitas »

Hi,
Using Nagios XI, is there a way to assign a new template to multiple hosts/services at once?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Template

Post by slansing »

Yes, you can apply a template to a hostgroup, so all of the hosts in that group would use it.
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: Template

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Template

Post 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.
Former Nagios employee
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: Template

Post by questrad »

Correct
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Template

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked