Cover by Wolfgang Barth

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

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 ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required