2.3 Defining the Machines to Be Monitored, with host

The host object is the central command post on which all host and service checks are based. It defines the machine to be monitored. The parameters printed in bold must be specified in all cases:

# -- /etc/nagios/mysite/hosts.cfg
define host{
   host_name                   linux01
   hostgroups                      linux-servers
   alias(*)           Linux File Server
   check_command                   check-host-alive
   max_check_attempts          3
   check_period                24×7
   contact_groups              localadmins
   notification_interval       120
   notification_period         24×7
   notification_options        d,u,r,f,s(*)
   parents                         router01

This parameter specifies the host name with which Nagios addresses the machine in services, host groups, and other objects. Only the special characters ...

Get Nagios, 2nd Edition now with O’Reilly online learning.

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