Re: [Nagios-devel] how to specify multiple dependencies

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] how to specify multiple dependencies

Post by Guest »

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 post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked