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.5 Defining Services to Be Monitored with service

A service in Nagios always consists of the combination of a host and a service name. This combination must be unique. Service names, on the other hand, may occur many times, as long as they are combined with different hosts.

The simplest service consists of a simple ping, which tests whether the relevant host is reachable, and which registers the response time and any packet loss that may occur:

# -- /etc/nagios/mysite/services.cfg
define service{
   host_name                         linux01
   service_description               PING
   check_command                     check_ping!100.0,20%!500.0,60%
   max_check_attempts                3
   normal_check_interval(*)          5
   retry_check_interval(*)           1
   check_period                      24×7
   notification_interval             120
   notification_period(*)            24×7
 notification_options ...

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