Managing Contact Templates
Contact templates within Nagios xi allow you to create definitions that can be used in multiple contacts. The main purpose of templates is to keep parameters that are generic to a group in one file to simplify administration and configuration.
Adding Contact Templates
Adding a contact template is a good first step in contact configuration. You can then use these added templates to build your contact structure.
-
Navigate to Configure > Core Configuration Manager > Contact Templates.
-
On the Contact Templates page, click the Add New button.
-
Fill out the fields on the new contact template as described in Understanding Users and Contacts.
Keep the fields as generic or specific as necessary for the group that the template will represent. -
Click the Save button and Apply Configuration.
Managing Contact Templates
Nagios xi provides you with the ability to copy, edit, and view relationships of existing service templates.
-
Navigate to Configure > Core Configuration Manager > Contact Templates.
-
On the Contact Templates page, find the template you wish to manage.
-
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 contact templates.
-
Delete - Deletes the selected template.
Keep the fields as generic or specific as necessary for the group that the template will represent. -
-
You can also activate or deactivate a template by clicking on the Yes or No link in the Active column.
-
Click the Save button and Apply Configuration.
-
On the Contact 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.