System information

Monitoring with Nagios 55
the person who is contacted on a failure of a service. Usually this is the responsible
administrator. use inherits configuration values from the generic-contact definition.
An overview of all Nagios objects and further information about them can
be found at: http://nagios.sourceforge.net/docs/3_0/
objectdefinitions.html.
3.4 Configuring Nagios
Learn step-by-step how to configure Nagios to monitor different things like remote
services or remote host-resources.
3.4.1 Monitoring Remote Services with
Nagios
This section explains how to monitor remote services with Nagios. Proceed as follows
to monitor a remote service:
Procedure3.1: Monitoring a Remote HTTP Service with Nagios
1 Create a directory inside /etc/nagios/objects using mkdir. You can use
any desired name for it.
2 Open /etc/nagios/nagios.conf and set cfg_dir (configuration directo-
ry) to the directory you have created in the first step.
3 Change to the configuration directory created in the first step and create the fol-
lowing files: hosts.cfg, services.cfg and contacts.cfg
4 Insert a host object in hosts.cfg:
define host {
name host.name.com
host_name host.name.com
address 192.168.0.1
use generic-host
check_period 24x7
check_interval 5
retry_interval 1