Home » Categories » Products » Nagios XI » Documentation » Advanced Topics

Managing Host Templates

Managing Host Templates

Host templates within Nagios XI allow you to create definitions that can be used in multiple hosts. The main purpose of templates is to keep parameters that are generic to a group in one file to simplify administration and configuration.

Examine the out-of-the-box host templates in the Host Templates page in the CCM for ideas on how to structure new templates or use the existing templates to build your host configurations.

Adding Host Templates

Adding a host template is a good first step in host configuration. You can then use these added templates to build your host structure.

  1. Navigate to Configure > Core Configuration ManagerHost Templates.

  2. On the Host Templates page, click the Add New button.

  3. Fill out the fields on the new host template as described in Using the CCM for Host Management.

    Keep the fields as generic or specific as necessary for the group that the template will represent.
  4. Click the Save button and Apply Configuration.

Managing Host Templates

Nagios XI provides you with the ability to copy, edit, and view relationships of existing host templates.

  1. Navigate to Configure > Core Configuration ManagerHost Templates.

  2. On the Host Templates page, find the template you wish to manage.

  3. In the Actions column, you will have the following actions available to you:

    • Edit - Allows you to edit the makeup of the template.

    • Copy - Copy a template to a new template to take advantage of an existing setup.

    • View Config - View the config file output for the template.

    • Relationships - Allows you to view the relationships among host templates.

    • Delete - Deletes the selected template.

    Keep the fields as generic or specific as necessary for the group that the template will represent.
  4. You can also activate or deactivate a template by clicking on the Yes or No link in the Active column.

  5. Click the Save button and Apply Configuration.

  6. On the Host Templates page, you can also multi-select templates and use the With checked dropdown to apply commands to the selected templates.

Template Inheritance

Nagios will allow objects to inherit from single or multiple templates. This allows basic templates to be layered, creating more complex templates.

When inheriting attributes from other templates, the definitions in each of the templates start with the first-level template. If it is found in the first one, that value is used, and if not, Nagios will check for a value in the second one and so forth. In other words, Nagios will perform a recursive check of all the other templates that are inherited from the currently checked template.

For more information about inheritance, see Object Inheritance with Templates.

0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios XI - How To Achieve High Availability
Viewed 9768 times since Wed, Jan 27, 2016
Converting PostgreSQL to MySQL for Nagios XI
Viewed 25192 times since Tue, Dec 6, 2016
Nagios XI - How To Test Check Commands From The Command-line
Viewed 33081 times since Tue, Jan 26, 2016
Nagios XI - Scheduling Reports and Pages
Viewed 3142 times since Thu, Jan 28, 2016
Nagios XI - Migrate Performance Data
Viewed 8555 times since Tue, Jan 26, 2016
Nagios XI - 10,000 Services and growing - NWC14
Viewed 5323 times since Mon, Feb 8, 2016
Nagios Core - Passive Monitoring with Nagios - NWC14
Viewed 8213 times since Mon, Feb 8, 2016
Nagios XI - How to Restart A Windows Service With NRPE
Viewed 8545 times since Thu, Jan 28, 2016
How To Download Files From The Nagios Exchange Using WGET
Viewed 9271 times since Tue, Aug 2, 2016
Nagios XI - Manual Backup And Restore Databases
Viewed 8091 times since Thu, Mar 31, 2016