Service dependecy on host


I just want to verify one point that we have servicedependency and hostdependency available at nagios 2.x/3.x , however we can not have a service dependency on a host level, is it correct?

For instance, assuming there are 2 services : B and C running on host B, service B is a child of Host A but service C is independent. When parent host A goes died/down, child service C on host B does not raise the alert but service C as an independent service will raise alert.

Is there a way to do that?
Thanks you very much!



Thinking maybe I can disable host_check and add service check doing the same host_check (check_ping/check_icmp in this case) and define in the servicedependency layer… might that work? /Pepper


I’m assuming you meant :

anyway, in both cases and as far as I know: you’re right: you can’t make a service depend on a host.
The solution you’re suggesting should work … but it also means that you’re increasing the number of tests done (which can be an issue if you’re also limited by your hardware).

And, moreover: I don’t trust dependencies in nagios: they never seem to work well (I still have to test them with nagios 3.x with the new option “enable_predictive_service_dependency_checks”), so I’d say you should avoid them whenever possible (to do that, we use passive checks or, when it concerns our own plugins, we hard-code the dependency…)


lol… you were absolutely correct about my typo.
I am also having a little trouble to find time and test out the theory. It’ll be nice to have this feature in place which allows you to set service dependency on the host layer.

Thanks very much for the reply!



Dear Peppermint,

I’m afraid that Service Dependencies won’t work as expected. Take a look at:


Hope it helps.