you need a ignore where host.name == "interconnect" for the host dependency.
Otherwise the dependency would be a loop on itself, I think.
Or does the host “interconnect” not have the variable location set to “main”?
Apart from missing states in you host dependency apply rule, though I’m not sure if there is a default, all other dependecies are looking good to me and should work.
Just in case you have the commented apply rule like you posted in your config:
be aware that you need * in front of every line for a multi-line comment:
/* #alternative with apply rule
*apply Dependency "ping4-interconnect" to Service {
* parent_host_name = "interconnect"
* parent_service_name = "ping4"
* states = [ OK ]
* disable_checks = true
* ignore_soft_states = false
* assign where service.check_command == "ping4"
* ignore where host.name == "interconnect"
*}
*/
Yes, it has default values, according to documentation
Configuration Attributes: States - Defaults to [ OK, Warning ] for services and [ Up ] for hosts.
I used
/*
_some_
_multiline_
_configuration_
*/
through all config files and there is no problem with validation and other host disapear from web GUI.
Anyvay I tried to remove the commented code from dependencies configuration but without change.
Ok, I probably found the problem. When I omit disable-host-service-checks dependency, everything works good. I think it’s because the ping4-interconnect dependency fails correctly, but after that disable-host-service-checks dependency check testing host, which is OK and the dependency passes, so notification is sent.
[2021-01-22 14:54:51 +0100] notice/Dependency: Dependency 'testing.tacr.local!interconnect' passed: Parent host 'interconnect' matches state filter.
[2021-01-22 14:54:51 +0100] notice/Dependency: Dependency 'interconnect!ping4!disable-host-service-checks' failed: Parent host 'interconnect' is in a soft state.
[2021-01-22 14:54:51 +0100] notice/Dependency: Dependency 'interconnect!ping4!disable-host-service-checks' passed: Parent host 'interconnect' matches state filter.
-> [2021-01-22 14:54:51 +0100] notice/Dependency: Dependency 'testing.tacr.local!ping4!ping4-interconnect' failed. Parent service 'interconnect!ping4' is CRITICAL
-> [2021-01-22 14:54:51 +0100] notice/Dependency: Dependency 'testing.tacr.local!ping4!disable-host-service-checks' failed: Parent host 'testing.tacr.local' is in a soft state.
-> [2021-01-22 14:54:51 +0100] notice/Dependency: Dependency 'testing.tacr.local!ping4!disable-host-service-checks' passed: Parent host 'testing.tacr.local' matches state filter.
[2021-01-22 14:54:51 +0100] notice/Dependency: Dependency 'testing.tacr.local!interconnect' passed: Parent host 'interconnect' matches state filter.
But I’m afraid, I cannot find solution with both dependencies
Out of interest, why did you implement the “disable-host-service-checks” dependency?
There already is a default implicit dependency of hosts to their own services. So if a host is down no notification will be sent for the services of that host. The only difference is that the checks are still running.
Apart from that I don’t really know how to implement both without interefering with each other.
You could try setting the host check command of your “interconnect” host to something else than a ping check, so that the host can be UP, while the ping4 service is CRITICAL.
I received notifications when host went back to up state, but it’s services were still critical.
When no checks are running if the host is down, then in the time it’s back up, there is still time at least to one check on services (because they are in soft state) and they get ok.
If the check are done during the host down state, when the host is back up, all services are already in hard state and notifications are sent immediately.
I found this solution here
It’s not the problem. In this situation the host interconnect remains up, even the ping service is critical, because it’s still reachable - host reachability RTA values (C,W) 100.00 ms, 200.00 ms vs ping service 3.00 s, 5.00 s
I think it’s because the the hosts states didn’t changed.
Or I don’t know where to find them.
Yes, I think, I canceled the test, because the ping4 on testing has been still checked.
When I removed the disable-host-service-checks the ping4 on testing turned gray and was no more checked.
Thx for the screen shots.
It really looks like the disable-host-service-checks depedency somehow interferes with the whole setup.
But I don’t know why.
I found recent issuse that maybe have something to do with your problem, but I’m not sure.
Maybe check those if they look like they might fit.
Other than that I’m out of ideas.
Maybe someone you/of the team can have a “quick” look at this, @theFeu ^^?