query about service dependencies

Atul Gosain atul at mindsw.com
Fri Aug 16 08:35:01 CEST 2002


Hi Nagios users

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?

Even 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,

Should nagios ideally show the status of dependent services to be unknown
or critical when the service on which its dependent upon is down??

Thanks
Atul






-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390




More information about the Users mailing list