We've moved to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

Service and host dependancies not working

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Service and host dependancies not working

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

Re: Service and host dependancies not working

Postby SuomyNonaPatri » Tue Apr 19, 2022 1:26 am

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.
SuomyNonaPatri
 
Posts: 6
Joined: Wed Feb 23, 2022 7:41 am

Re: Service and host dependancies not working

Postby SalinaSJames » Wed Apr 27, 2022 4:26 am

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.
SalinaSJames
 
Posts: 9
Joined: Sat Feb 12, 2022 1:21 am


Return to Community Support

Who is online

Users browsing this forum: No registered users and 13 guests