Configuring host roles using groups

In this recipe, you'll learn how to use the abstraction of host and service groups to your advantage in order to build a configuration where hosts and services can be added or removed more easily. We'll do this by defining roles for hosts using a hostgroup structure and then assigning relevant services to the hostgroup rather than to the hosts individually.

Getting ready

You will need to have a server running Nagios Core 4.0 or later, have access to the command line to change its directories, and understand the basics of how hostgroups and servicegroups work. These are covered in the recipes Creating a new hostgroup and Creating a new servicegroup in Chapter 1, Understanding Hosts, Services, and Contacts.

In this ...

Get Nagios Core Administration Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.