how to specify multiple dependencies

Andy Shellam andy-lists at networkmail.eu
Tue Oct 7 18:57:26 CEST 2008


Hi Guillaume (again!)

I think you've got these the wrong way round.

In your example, if service A depends on B or C, then hosts B and C 
become the dependent hosts.  Does this work?  (I've not used service 
dependencies a great deal so forgive me if I'm wrong.)

define servicedependency {
     host_name                           A
     service_description                 X
     dependent_host_name                 B,C
     dependent_service_description       Y
}

I think this says that service X on host A depends on service Y on hosts 
B and C.  Whether this is an AND or an OR (e.g. host A depends on hosts 
B AND C, or host A depends on hosts B OR C) I don't know.

PS. Both of your last questions should have been directed at the 
nagios-users list - nagios-devel is for reviewing and submitting 
patches, or other questions that concern the development of Nagios.

Andy

Guillaume Rousse wrote:
> Hello list.
>
> I understand the main idea behind service dependencies, to avoid 
> duplicated alerts for service A when another depended service B is down. 
> However, when this other service B is redunded by service C, how to 
> specify than A depends on (B or C) ?
>
> AFAIK, the syntax specifying multiple host in a dependency relationship 
> doesn't imply any relationship between those host, but is just syntaxic 
> sugar for multiple declaration:
>
> define servicedependency {
>      host_name                           B,C
>      service_description                 X
>      dependent_host_name                 A
>      dependent_service_description       Y
> }
>
> is strictly equivalent to:
> define servicedependency {
>      host_name                           B
>      service_description                 X
>      dependent_host_name                 A
>      dependent_service_description       Y
> }
> define servicedependency {
>      host_name                           C
>      service_description                 X
>      dependent_host_name                 A
>      dependent_service_description       Y
> }
>   

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/




More information about the Developers mailing list