Page 1 of 1

Wizard Templates

Posted: Fri Feb 24, 2017 12:51 pm
by gwakem
Is there a way to save or edit a "wizard Template" to use a null value for check interval, retry interval, max check attempts, notification period, and notification interval?

Background for this question: I have to add dozens of hosts at a time, and use a host template to specify all critical items for those hosts (check interval, retry interval, max check attempts, notification period, notification interval, contacts, etc.) Essentially everything outside of host name and IP is controlled by the host template.

To ease this creation, I have tried to use the host creation tool wizard (https://exchange.nagios.org/directory/A ... ol/details), but that forces the setting of the above values. As a work around, I tried to create a wizard template and edit it to use null values, but I found saving the wizard template with nothing in those fields simply causes it to revert to what it had previously.

Everything I try to do forces the above settings to be written to every host config, and removing them, even through the bulk modification tool makes the whole process take more time than just creating them by hand.

If there is not feasible work around for this, I am open to another suggestion as to how to get these new hosts created quickly and still solely controlled by the master host template.

Re: Wizard Templates

Posted: Fri Feb 24, 2017 3:16 pm
by ssax
Not currently, I've requested that a feature request be entered:

Code: Select all

XI - Wizard Templates - Add the ability to set the values to inherit from a template (kind of like API force=1 option)
You may be able to use the API for this, please see here for examples:

Code: Select all

http://YOURXISERVER/nagiosxi/help/api-config-reference.php
Pay specific attention to the force=1 parameter:
Note: If you need to skip the per-item config verification add force=1 to the config API request. This is especially helpful when applying an object that uses a template and may be inheriting one of the required parameters such as check_command which the CCM verification will not know about. Warning: This can cause the apply config to fail if not used properly.
Let us know if you have any questions.


Thank you