Service and host dependancies not working
Posted: Wed Apr 13, 2022 4:26 pm
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
}
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
}