Using templates

Templates in Nagios allow you to create a set of parameters that can then be used in the definitions of multiple hosts, services, and contacts. The main purpose of templates is to keep parameters that are generic to all objects or a group of objects in one place. In this way you can avoid putting the same directives in hundreds of objects and your configuration is more maintainable.


Nagios allows an object to inherit from single or multiple templates. Templates can also inherit from other templates. This allows for the creation of very simple templates, where objects inherit from a single template, as well as a complex templating system, where actual objects (such as services or hosts) inherit from multiple templates. It is ...

Get Learning Nagios - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.