Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to setup dependencies for a router and several servers. What I want to do is setup the router as the Master Host so if the router fails all other services on the servers won't alert.

Unfortunately this is easier said than done. Is there an easy way to setup service dependencies for all services on a server for a Master Host (or my router)?

Nagios has some documentation but it will be extremely time consuming to add a single service dependency definition for every service.

share|improve this question
up vote 6 down vote accepted

What you want in this case is not dependencies (as Nagios calls them), but rather you want parent/child relationships in your hosts. If the parent is down and children can not be reached Nagios considers them "unreachable" instead of "down". You can then configure not to be notified if things are "unreachable". You can read more about this in the Nagios documentation here.

Also, from the same section of the 2.0 documentation it is pointed out that services won't alert if the host is down (saving you those alerts):

Whenever a service check results in a non-OK status level, Nagios will attempt to check and see if the host that the service is running on is "alive". Typically this is done by pinging the host and seeing if any response is received. If the host check command returns a non-OK state, Nagios assumes that there is a problem with the host. In this situation Nagios will "silence" all potential alerts for services running on the host and just notify the appropriate contacts that the host is down or unreachable. If the host check command returns an OK state, Nagios will recognize that the host is alive and will send out an alert for the service that is misbehaving.

Service dependencies by default are not inheritable from a host template, but I believe the parent is. So you can inherit parents from templates (if I am correct in this) and save yourself some typing.

Lastly, I actually like to have unreachable alerts enabled. If the router goes down, I want my phone to go "nuts". :-)

share|improve this answer
Yes, this is much easier then setting up service dependencies. – Stefan Lasiewski Jun 11 '10 at 23:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.