Nagios Dependencies and Parents


Nagios 2.2 was released today so I decided to update my Nagios install at home which monitors my company’s server as well as Ken’s company server. I use Nagios, currently, to monitor ping, smtp, imap, pop, httpd, dns, and ftp. Just the basics. Once I get some free time, I am going to set up NPRE so I can monitor disk space, load, swap, etc. Since I had to update my install of Nagios (just run the same ./configure script I ran when installing it, make all, make install, make install-commandmode) I decided to finally figure out how to cut down the number of notifications I receive on a given day where my home internet goes down.

What I wanted: Nagios to send a SMS when any services of my server were unavailable as well as if my server was down.

What I did not want: Nagios to send me a SMS for every service when my local connection was down…after my local connection went back up. Not only was I getting messages that my local connection went down (after it went back up), I was also getting a text message for each service I was monitoring saying it was down, then recovered when really my local connection went down. Not good.

At first I thought I needed to use “host dependencies” in Nagios. The way I looked at it, I figured that my local router was dependent on the Comcast router, and my server was dependent on the my hosting company’s router, etc. While dependencies are helpful for more complicated setups (web servers who are dependent on database servers, etc).

What I really needed-and finally figured out-was to define “parents” for each of my hosts. After doing some research about dependencies and parents, I realized that if I set up parents, I could finally get the outage notifications and reporting I was looking for. For my setup, I have five hosts:

  1. My remote server
  2. Ken’s remote server
  3. Our hosting company’s router
  4. Comcast’s router
  5. My local router
  • My server has a parent: the hosting company’s router
  • Ken’s server has a parent: the hosting company’s router
  • The hosting company’s router has a parent: Comcast’s router
  • Comcast’s router has a parent: my local router
  • My local router does not have any parents because it is on the local network

So far, so good.

Helpful resources

One thought on “Nagios Dependencies and Parents”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.



Instead of practicing my short game or enjoying the nice weather in the backyard on the hammock, I decided to spend my day yesterday squashing IE 6 bugs. Issue #1 and #2 that took me several hours to resolve: Everything displayed fine in Safari, Opera, Firefox, etc but not in IE 6 for the PC. […]


Short Game Practice

Every day for the last week I have been going outside after work with Triscuit to practice my short game. Triscuit runs laps, and I get my sand wedge and some wiffle golf balls out and aim for a specific target (the sandbox). I am hoping to focus on my short game and course management […]