I'm trying to model a network of servers, routers and switches with nagios so that I can minimise false alarms/floods of emails. The topology is reasonably complex, with hosts having a single router as a parent, but connected via a switch on multiple VLANs (and therefore connected to several routers).

I have arranged to have each server dependent on the switch it's connected to. My reading of the documentation suggests that, with predictive host dependency checks on (they are) this should cause immediate checks of depended-upon (master) hosts, and the suppression of notifications should the master host be found down (it doesn't).

My host dependencies take the simple form:

define hostdependency {
     host_name switch-x
     dependent_host_name server-y
     notification_failure_criteria d

Testing took place with iptables rulesets to simulate the relevant network outages, blocking outgoing access to the switch, and the servers connected to them.

I've tested this with nagios 3.2.1-2 from Debian squeeze, and 3.2.3-3 from wheezy (I couldn't see any relevant changelog entries in the latest upstream, 3.3.1). Debugging logging confirmed that the expected message from base/checks.c "Propagating predictive dependency checks to hosts this one depends on...\n" never appears.

The behaviour when the router (is simulated to) go down is correct; the hosts behind the router show up as unreachable rather than down, and notifications are not sent out.

What is going wrong here?

1 Answer 1


You are confusing host dependencies with parent/child host relationships. Host dependencies have no influence on the reflection of your network topology. You should use parent/child relationships.

  • No, I'm not. I am using parent/child relationships to represent the layer 3 topology, but it's not possible to represent the switches in this way too, unless I represent them as one "host" per VLAN, which is pretty messy (and I'd still need host dependencies to prevent getting duplicate notifications from the multiple switch instances). The behaviour I'm expecting, but not getting, is described at nagios.sourceforge.net/docs/nagioscore/3/en/dependencies.html.
    – dom
    Aug 27, 2011 at 16:20
  • Do you still get notification for server-y when simulating that switch-x is down?
    – quanta
    Aug 29, 2011 at 3:33
  • Yes, that's exactly the problem; when simulating that both switch-x and server-y is down, I get notifications about both, when I'd only expect to get notifications about switch-x.
    – dom
    Aug 31, 2011 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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