[Nagios-devel] how to specify multiple dependencies

Andy Shellam andy-lists at networkmail.eu
Thu Oct 9 19:41:11 CEST 2008


Hi Guillaume,

>> 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. 
>>     
> It says than you have two services Y, running on hosts hosts B and C, 
> each relying on a single service X, running on host A. If X fails, 
> monitoring of Y will be affected on both hosts. I'm looking for exactly 
> the opposite: two redundant authentications backends available, and one 
> authenticated service, for wich I'd like to avoid useless notifications 
> if both backends are down.
>   
Ah OK, in that case switch host_name and dependent_host_name and 
service_description and dependent_service_description around.
>   
>> 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.
>>     
> AFAIK, this is purely syntactic sugar for multiple declarations, so 
> rather an OR relationship.
>   
Is that not what you need?  You asked in your original question "how to 
specify than A depends on (B or C) ?"

The documentation says "You can create several dependencies for a given 
service, but you must add a separate service dependency definition for 
each dependency you create" which I would read as you'd need to create 2 
separate servicedependency entries, one for the dependency on 
host/service B and one for the dependency on host/service C to get this 
effect, again I'm not 100% sure.
>   
>> 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.
>>
>>     
> Indeed.
>   
Andy

-------------------------------------------------------------------------
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=/
_______________________________________________
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