Query about service dependencies

Atul Gosain atul at mindsw.com
Wed Aug 14 09:42:26 CEST 2002


Hi

I have been trying to configure service dependencies on nagios but couldnt
understand how they r working.
In my case there r 3 hosts
scotty-->hathway-->mindsw.com

I  have defined host dependencies for them  in which mindsw.com is
dependent on hathway and hathway is dependent on scotty.
I am pasting the dependencies file.

##########################################################################
#Scotty-->Hathway-->Mindsw.com
define servicedependency{
        host_name                        scotty
        service_description                PING
        dependent_host_name                hathway
        dependent_service_description        PING
        execution_failure_criteria        w,u,c
        notification_failure_criteria        w,u,c
        }

define servicedependency{
        host_name                        scotty
        service_description                PING
        dependent_host_name                mindsw.com
        dependent_service_description        PING
        execution_failure_criteria        w,u,c
        notification_failure_criteria        w,u,c
        }

define servicedependency{
        host_name                        hathway
        service_description                PING
        dependent_host_name                mindsw.com
        dependent_service_description        PING
        execution_failure_criteria        w,u,c
        notification_failure_criteria        w,u,c
        }

#servicedependency definition
define servicedependency{
        host_name                       mindsw.com
        service_description             PING
        dependent_host_name             mindsw.com
        dependent_service_description   HTTP
        execution_failure_criteria      w,u,c       ; These are the
criteria for which check execution will be supressed
        notification_failure_criteria   w,u,c   ; These are the criteria
for which notifications will be supressed
        name                                mindsw_serv_template
        }

#servicedependency definition
define servicedependency{
        host_name                       hathway
        service_description             PING
        dependent_host_name             scotty
        dependent_service_description   DNS check
        execution_failure_criteria      w,u,c       ; These are the
criteria for which check execution will be supressed
        notification_failure_criteria   w,u,c   ; These are the criteria
for which notifications will be supressed
        }

define servicedependency{
        use                                mindsw_serv_template
        dependent_service_description   Current Users
}

define servicedependency{
        use                                mindsw_serv_template
        dependent_service_description   Total Processes
}
define servicedependency{
        use                                mindsw_serv_template
        dependent_service_description   POP Service
}
define servicedependency{
        use                                mindsw_serv_template
        dependent_service_description   IMAP Service
}
define servicedependency{
        use                                mindsw_serv_template
        dependent_service_description   SMTP Service
}
define servicedependency{
        use                                mindsw_serv_template
        dependent_service_description   MySql Service
}

define servicedependency{
        use                                mindsw_serv_template
        dependent_service_description   Load Check
}
define servicedependency{
        use                                mindsw_serv_template
        dependent_service_description   Zombie Processes
}
define servicedependency{
        use                                mindsw_serv_template
        dependent_service_description   Memory Checking
}

define servicedependency{
        use                                mindsw_serv_template
        dependent_service_description   DNS check
}

define servicedependency{
        use                                mindsw_serv_template
        dependent_service_description   POP Relay Service Check
}
define servicedependency{
        use                                mindsw_serv_template
        dependent_service_description   SSH service check
}
define servicedependency{
        use                                mindsw_serv_template
        dependent_service_description   /dev/hda1 Free Space
}

# Servicedependency definition
define servicedependency{
        host_name                       scotty
        service_description             PING
        dependent_host_name             scotty
        dependent_service_description   HTTP
        execution_failure_criteria      w,u,c       ; These are the
criteria for which check execution will be supressed
        notification_failure_criteria   w,u,c   ; These are the criteria
for which notifications will be supressed
        name                                scotty_serv_template
        }

define servicedependency{
        use                                scotty_serv_template
        dependent_service_description   Current Users
}

define servicedependency{
        use                                scotty_serv_template
        dependent_service_description   Total Processes
}

define servicedependency{
        use                                scotty_serv_template
        dependent_service_description   IMAP Service
}

define servicedependency{
        use                                scotty_serv_template
        dependent_service_description   SMTP Service
}

define servicedependency{
        use                                scotty_serv_template
        dependent_service_description   MySql Service
}

define servicedependency{
        use                                scotty_serv_template
        dependent_service_description   Load Check
}

define servicedependency{
        use                                scotty_serv_template
        dependent_service_description   Zombie Processes
}

define servicedependency{
        use                                scotty_serv_template
        dependent_service_description   Memory Checking
}

define servicedependency{
        use                                scotty_serv_template
        dependent_service_description   /dev/hda1 Free Space
}

define servicedependency{
        use                                scotty_serv_template
        dependent_service_description   Bandwidth Check
}

define servicedependency{
        use                                scotty_serv_template
        dependent_service_description   SNMP Check
}

define servicedependency{
        use                                scotty_serv_template
        dependent_service_description   SSH service check
}

################################################################################
# HOST DEPENDENCY DEFINITIONS
#
# SYNTAX:
#
################################################################################


define hostdependency{
        host_name                       hathway
        dependent_host_name             mindsw.com
        notification_failure_criteria   d,u
        }

define hostdependency{
        host_name                       scotty
        dependent_host_name             hathway
        notification_failure_criteria   d,u
        }
###############################################################################

I have some basic questions about it.

What does hostdependency mean?
It should mean that when hathway is down , nagios should not even check
for the services of mindsw.com, but we have to define the service
dependencies also, Why?

In service dependencies, i have defined that PING of mindsw.com is
dependent on PING of hathway and all the services of mindsw.com are
dependent on PING of mindsw.com. Even then, when hathway is down, nagios
checks for all the services of mindsw.com and then shows them in critical
state.
Should it show the services of mindsw.com in Unknown state if the service
they are dependent on is not OK??

I have also set soft_state_dependencies=1 in nagios.cfg also, so that if
any service fails and has soft error state, then also the dependent
services should not be executed.

Thanks
Atul





-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31




More information about the Users mailing list