O'Reilly logo

Nagios, 2nd Edition by Wolfgang Barth

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.4 Grouping Computers Together with hostgroup

A host group contains one or more computers so that they can be represented in the Web interface together (see Figure 16-10 in page 334)—in addition, certain objects (e.g., services) can be applied to an entire group of computers instead of having to define them individually for each host.

The hostgroup_name parameter specifies a unique name for the group, alias accepts a short description. The members parameter lists all hosts names belonging to the group, separated by commas:

# -- /etc/nagios/mysite/hostgroups.cfg
define hostgroup{
    hostgroup_name           linux-servers
    alias                    Linux Servers
    members                      linux01,linux02
    hostgroup_members(*) hostgroup1,hostgroup2
}

If you specify to which group they belong in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required