Circular parent/child dependency

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
dariopalermo
Posts: 48
Joined: Fri Oct 31, 2014 1:13 pm

Circular parent/child dependency

Post by dariopalermo »

I know this is nrearly a FAQ but still I wasn't able to find a good answer: how can you handle a network that has redundant paths, so that a child can (and sometimes will) become the parent and viceversa?

To be more clear:

Code: Select all

          N
          |
          A
       /      \
      B       H
      |       |
      C       G
      |       |
      D       F
       \     /
          E      
Nagios (N) is connected to A. If I set E to have two parents (D and F) and then make two child/parent separate chains (D-C-B-A and F-G-H-A) the map looks ok but the down/unreachable logic will be broken:

1) If H fails, F and G are declared unreachable, but they aren't because I can reach them from E.
2) With H already failed and having G as an important network node (while H is not so important and doesn't require immediate attention), if F fails I will not get any alert (because F and G are unreachable)

This is only an example, my actual network is far more sophisticated and has a lot of redundant paths, sometimes on L2 layer (breaking loops with STP) and sometimes at L3 (defining routes with BGP/OSPF).

I understand that there are at least two different problems with circular parent/child relations: one is making the map and the other one is preventing the recursive checking engine to end up in an endless loop. Is there any solution?

Bye
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Circular parent/child dependency

Post by abrist »

I assume these issue are due to the nagios server being able to route to F and G through E when H is down. If the routes work this way, you are correct that those boxes are still reachable, but the should be treated as "unreachable" if they are set as children of H. Could you clarify the issue a bit more for me?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
dariopalermo
Posts: 48
Joined: Fri Oct 31, 2014 1:13 pm

Re: Circular parent/child dependency

Post by dariopalermo »

In this case, we're talking of a L2 network segment with STP enabled. When all links are up, STP will put a port on E down to prevent loops. When a link (or a router) goes down, network topology changes in response. It's very simple and common, but I can't find a way to make it work in Nagios.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Circular parent/child dependency

Post by tmcdonald »

You might try checking remotely from E instead of directly from N. That way if H goes down then G and F are still reachable from E, same goes for B going down and C + D being reachable. Now the question is: Which set of devices are more important? B + H or D + F? In the case of checking from E, if F goes down is that as critical as H going down? Same question for D vs B.
Former Nagios employee
dariopalermo
Posts: 48
Joined: Fri Oct 31, 2014 1:13 pm

Re: Circular parent/child dependency

Post by dariopalermo »

I'll try to clarify. We got 2 railroads, both going from A to E but on different paths.

To make an example, A is New York, E is Los Angeles. B is Chicago and H is Atlanta, and so on. All of them are cisco switches. Nagios (N) is connected to New York, our single server farm.

The network is far more extended (over 30 nodes) with multiple important nodes on both paths. And this is the first of 4 networks I need to put under monitoring. Every network has at least a ring design (the most complex is a nightmare from the nagios point of view... 3 branches with multiple fiber optic pairs for link redundancy with 8 L3 nodes, each with at least 2 connection to other L3 nodes, and 90 L2 nodes, each connected to 2 different L3 nodes).

I really need a monitoring system smart enough to handle multiple link paths... finding alternative fail proof methods seems to be an impossible mission. And, of couse, I'd like to use a single sw for network and servers. I just don't know if Nagios can do the job...
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Circular parent/child dependency

Post by abrist »

Well, your (redundant) routes should provide nagios with a near failsafe way to monitor each server in this type of setup. The big issues are the parent child relationships. Those seem mostly useless unless all routes are down. And therein is the issue - if one parent goes down,its children are marked unreachable even though they are reachable through a different (transparent) route. Are parent-child relationships needed? Would host dependencies work better?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
dariopalermo
Posts: 48
Joined: Fri Oct 31, 2014 1:13 pm

Re: Circular parent/child dependency

Post by dariopalermo »

I didn't try to make it work with host dependencies rather than with parent/child logic because I'd lose the map, right?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Circular parent/child dependency

Post by abrist »

dariopalermo wrote:because I'd lose the map, right?
Right.
I dont really have a good suggestion here other than referring you to the nagvis UI as you can create custom maps there that do not rely of parent-child relationships.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
dariopalermo
Posts: 48
Joined: Fri Oct 31, 2014 1:13 pm

Re: Circular parent/child dependency

Post by dariopalermo »

Ok, I never used nagvis but that should solve the map problem, as you said. Back to the main issue, do you think I can make it work with host dependency? No circular prevention checks on that? And last but not least, should I set inheritance?

Thanks
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Circular parent/child dependency

Post by abrist »

dariopalermo wrote:do you think I can make it work with host dependency?
Possibly, but you will miss out on the "unreachable" status that parent-children provide.
dariopalermo wrote:No circular prevention checks on that?
There are, so you will have to make a decision where you stop the dependency chain (before a loop is detected)/
dariopalermo wrote:should I set inheritance?
Could you clarify?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked