Service and Host dependencies

Rob Nelson rob at capband.net
Mon Dec 15 16:29:19 CET 2003


Hi there,

My goal is to try and get Nagios to stop testing and sending notifications 
for devices when a parent device is down or unreachable. So far, I've been 
successful in getting "Host UNREACHABLE" notifications instead of "Host 
DOWN", when the parent dies, but the checks are still run.

For simplicity's sake, I'd like to know what code I should use for 
sumter.57.SM4 and sumter.24.601. The device sumter.57.SM4 is a Motorola 
Canopy device receiving signal from upstream. The device sumter.24.601 is a 
wireless access point connected to the ethernet port of the Canopy, so if 
the canopy device disconnects, the WAP is beyond our reach.

Excerpt from sumter-square.hosts:
============================
define host{
         use                     generic-host
         host_name               sumter.57.SM4
         alias                   Canopy 5.7 SM Bldg. 601 Charleston Dr.
         address                 10.10.4.19
         parents                 sumter.57.AP1
         check_command           check-host-alive
         max_check_attempts      3
         notification_interval   480
         notification_period     24x7
         notification_options    d,u,r
         }

define host{
         use                     generic-host
         host_name               sumter.24.601
         alias                   Bldg. 601 - Smartbridge
         address                 10.10.4.64
         parents                 sumter.57.SM4
         check_command           check-host-alive
         max_check_attempts      3
         notification_interval   480
         notification_period     24x7
         notification_options    d,u,r
         }
===========================

Excerpt from sumter-square.svcs:
===========================
define service{
         use                     generic-service
         host_name               sumter.57.SM4
         service_description     http
         is_volatile             0
         check_period            24x7
         max_check_attempts      3
         normal_check_interval   5
         retry_check_interval    2
         contact_groups          radio-admins
         notification_interval   480
         notification_period     24x7
         notification_options    w,u,c,r
         check_command           check_canopy
         }

define service{
         use                     generic-service
         host_name               sumter.24.601
         service_description     ping
         is_volatile             0
         check_period            24x7
         max_check_attempts      3
         normal_check_interval   5
         retry_check_interval    2
         contact_groups          radio-admins
         notification_interval   480
         notification_period     24x7
         notification_options    w,u,c,r
         check_command           check_ap
         }
===========================

As you can see, I use the command "parents  sumter.57.SM4" in the host 
definition of sumter.24.601 to get the "Host UNREACHABLE" messages. Now, 
what can I do to stop the host and service checks from running?

I have looked at http://nagios.sourceforge.net/docs/1_0/dependencies.html 
but the doc is pretty confusing. There is no clear statement of what occurs 
when a dependency fails nor what the goal of dependencies are. I'd also 
think there's got to be a better way where I add the dependencies in the 
service definition, rather than in a separate file.

Rob Nelson
Network Administrator, Capitol Broadband
C: 919-369-1874
rob at capband.net 



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list