Page 1 of 1

Using Customer Host Templates

Posted: Thu Aug 21, 2014 3:09 pm
by gregwhite
We have modified several host templates so they have site specific defaults. What we want to be able to do is to use the Host Creation Tool, select Network device and have it use
the Network template we have created. This would allow us to import mutliple network devices and have them all receive the default settings and contacts that all network devices will
use. So how could we change the template from the genericnetwork device to our own template.

thanks,

Re: Using Customer Host Templates

Posted: Thu Aug 21, 2014 3:40 pm
by abrist
You have 3 options:
1) Change the generic template.
2) Add a new template after the wizard process.
3) Alter the php source for the wizard to use a different template.

Re: Using Customer Host Templates

Posted: Fri Aug 22, 2014 4:28 pm
by gregwhite
Thanks for the suggestions. Modifying existing templates seems like the easiest option. If I modify existing templates, will upgrades to Nagios wipe out these modified templates?

Re: Using Customer Host Templates

Posted: Mon Aug 25, 2014 1:08 am
by Box293
Yes.

You could create an alternatively named version of the Wizard which will prevent this from happening.

Here's a talk I did on customizing wizards:

http://vimeo.com/52112420
http://www.slideshare.net/nagiosinc/nag ... -nagios-xi

And Jake Omann has also done a talk on it:
https://www.youtube.com/watch?v=tBqj4j52an8

Re: Using Customer Host Templates

Posted: Thu Sep 04, 2014 11:02 am
by gregwhite
So we have taken a copy of the Hostcreation tool and are modifying it to use our custom host templates. We have a generic_host template that contains all basic settings that will apply to
all devices. (This is our base level). Then we have a 'router_switch_host' template that has setting specific to the router or switch, like an addtional contact group and a hostgroup. The template
references back to the generic_host template.
I would like to verify the following:
1) For the devices we are adding: we select the Switch from the HostCreation Tool. We have modified it so it uses the router_switch_host template.
These devices will pick up the settings from the generic_host template and add any additional setting from the router_switch_host template. - True?
2) Any settings from the host creation tool will not be used if they are defined in one of these two templates. - True?
I noticed that these settings that are defined in the templates including the hostgroup the devices get assigned to only display when looking at the devices in core. It would
be nice when looking at the host in config mgr you could see what settings have been applied to that host or at least provide a link back to each template that has been applied.
This way you can see it in a single view from the host you are looking at while in config mgr.

Re: Using Customer Host Templates

Posted: Thu Sep 04, 2014 1:59 pm
by Box293
gregwhite wrote:1) For the devices we are adding: we select the Switch from the HostCreation Tool. We have modified it so it uses the router_switch_host template.
These devices will pick up the settings from the generic_host template and add any additional setting from the router_switch_host template. - True?
Yes this is true. If the generic template and the switch template have conflicting options, then the switch template will "win". Then on the actual host definition, if those settings are also defined then these will "win". It's a layering effect.
gregwhite wrote:2) Any settings from the host creation tool will not be used if they are defined in one of these two templates. - True?
When a setting is selected in a wizard, that setting will be used as it will be defined in the host object itself and any settings in the host object "win" over templates.
gregwhite wrote: It would be nice when looking at the host in config mgr you could see what settings have been applied to that host or at least provide a link back to each template that has been applied.
This sounds like a good feature request.

Re: Using Customer Host Templates

Posted: Thu Sep 04, 2014 3:16 pm
by gregwhite
Got it!! Thanks.