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.
http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#servicedependency
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):
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". :-)