Not correct! A host can have many parents or just one parent. There may come a point in your network layout that you have a circular path from nagios' point of view. For example:
router1 connects to Router2, switch1 and switch2. Router2 connects to router1, switch1 and switch2. Your packets may only flow through router1 to switch1 to a host on that switch, due to the router, but from nagios' point of view, you have a circular network and it doesn't like that. So youi can't specify the parent/child relationship precisely as the network is laid out. At some point, you just reverse the relationship, and then nagios' is cool with that.
So in your case, it's precisely what we have here in our company. Many paths to the same host from nagios. As a matter of fact, we have 3 paths here at some points.
First, we must decide if you need to be concerned about those routers in between nagios and the host. Are you responsible for those routers? If not, then if they are broken, there isn't anything you can do about it anyway, so why bother to monitor them? Example:
Lets say we have nagios setup to monitor www.google.com for httpd. Simple task, but if I also include the routers between us, if they break, I just have to call my ISP and they are going to say the problem is with ATT routers and the net will be back online when they get done. So why bother to ping the routers? Simply ping google.com, and query the httpd port, and if the ping fails then it's the ISP's problem to fix that.
But if the routers are your responsibility, then you need to complete what I have outlined in the URL I posted above. i.e. Map out on paper, every single cable connection from your nagios pc all the way to the host you are monitoring. Every port, even the eth0 on your nagios pc, will become a host(along with a service check for ifoperstatus using check_snmp). When you are done, your status map will now look like a network diagram showing that nagios-eth0 is plugged into switch1-port3, switch1-port23 is trunked to router1-port1 and switch1-port24 is trunked to router2-port1. Now we really don't care which path your packets take, using router1 or router2, but we do care about the cable plugged into router1&2-port1. If a snmp query of the ifoperstatus of those ports is down, then the cable is cut/broken or the router port is defective.
If you are unclear as to what I'm suggesting, then please ask. But as stated, you need to figure out, whether these routers are your job, or ATT's/ISP's/or someone else.
Edited Fri Jun 03 2005, 05:49AM ]