Service and host dependancies not working

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
troyb
Posts: 3
Joined: Wed Aug 04, 2021 5:49 pm

Service and host dependancies not working

Post by troyb »

Hello all,

I have the following dependencies setup and they do not seem to work as documented in the dependencies documentation.
What we are seeing is that when H1 goes down, H2 will alarm for its services but the host will show up. H3 will show its services down but the host will show up.

If we add the "inherits_parent 1" to service dependency configs, then it breaks all dependency checks and all three hosts and services show down when host H1 is down.

What we are trying to accomplish is that any host that goes down should not check its services because the host is down so the services would be assumed down. For dependent hosts, if a "master" host goes down, then the dependent host(s) and sub-dependent host(s) don't get checked and the services for those hosts also don't get checked as it is assumed that they are down.

Does this make sense? based on docs on the dependencies, this should all work.

We are running core version 4.4.6. We also have in the nagios.cfg file host_down_disable_service_checks=1



###############################
## Host dependency definitions ##
###############################

define hostdependency{
host_name NAG-TEST-H1
dependent_host_name NAG-TEST-H2
execution_failure_criteria d,u
notification_failure_criteria d,u
inherits_parent 1
}

define hostdependency{
host_name NAG-TEST-H2
dependent_host_name NAG-TEST-H3
execution_failure_criteria d,u
notification_failure_criteria d,u
inherits_parent 1
}

##########################
## Service Dependencies ##
##########################

define servicedependency{
host_name NAG-TEST-H1
service_description PING
dependent_host_name NAG-TEST-H2
dependent_service_description PING
execution_failure_criteria w,u,c,p
notification_failure_criteria w,u
}

define servicedependency{
host_name NAG-TEST-H1
service_description PING
dependent_host_name NAG-TEST-H2
dependent_service_description SSH
execution_failure_criteria w,u,c,p
notification_failure_criteria w,u
}
SuomyNonaPatri
Posts: 11
Joined: Wed Feb 23, 2022 7:41 am

Re: Service and host dependancies not working

Post by SuomyNonaPatri »

You want service dependencies for each Selenium check, in this case.
The Selenium check for "server B" depends on a service check that's on server B (for example, a check of the web server using check_http).
You can simplify the configuration using host and/or service groups with omeglesahgle dependencies.
Last edited by SuomyNonaPatri on Mon May 30, 2022 11:03 pm, edited 1 time in total.
SalinaSJames
Posts: 13
Joined: Sat Feb 12, 2022 1:21 am

Re: Service and host dependancies not working

Post by SalinaSJames »

Host dependencies work in a similar fashion to service dependencies, just for host versus services.
A host can be dependent on one or more other hosts
Host dependencies are not inherited (unless specifically configured)
Host dependencies can be used to cause host check execution and host notifications to be suppressed under different circumstances (UP, DOWN, and/or UNREACHABLE states)
Host dependencies might only be valid during specific time periods
Do not confuse host dependencies with parent child host relationships. You should be using parent/child host relationships for most cases, rather than host shagle omegle voojio dependencies.
Locked