Sample services.cfg

define service {
        name                            generic-service
        active_checks_enabled           1
        passive_checks_enabled          1
        parallelize_check               1
        obsess_over_service             1
        notifications_enabled           1
        event_handler_enabled           1
        flap_detection_enabled          1
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              4
        normal_check_interval           5
        retry_check_interval            1
        notification_interval           960
        notification_period             24x7
        register                        0
}

define service {
  use                            generic-service
  host_name                      monitor, filesrv1, dbsrv1
  service_description            PING
  check_command                  check_ping!100.0,20%!500.0,60%
  contact_groups                 serveradmins
}

define service {
  use                            generic-service
  host_name                      itswitch,salesswitch,accountswitch,firewall,wanrouter
  service_description            PING
  check_command                  check_ping!100.0,20%!500.0,60%
  contact_groups                 netengineers
}

Like our hosts.cfg, the first definition in this file is really a template. The generic-service template defines all the directives that will be shared by our services. Our second service definition actually defines multiple services. The service definition specifies multiple hosts in the host_name directive, meaning this service will belong on all of these hosts.

Sample escalations.cfg

define hostescalation { hostgroup_name servers, networking contact_groups managers first_notification 5 last_notification 0 notification_interval 60 escalation_period 24x7 escalation_options d,r } define serviceescalation { hostgroup_name servers, networking contact_groups managers service_description PING first_notification 5 last_notification 0 notification_interval ...

Get Network Monitoring with Nagios now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.