Review: Nagios Core Administration Cookbook

Date March 13, 2013

I like Nagios. I mean, I like monitoring in general, but I like Nagios because it doesn't necessarily tell me what I have to monitor, and it especially doesn't tell me how I have to monitor it. It's very extensible, and although it certainly has flaws, I think it's a good, solid, reliable system that has cost me a great deal of sleep in my life as a system administrator.
Nagios Core Administration Cookbook
When Packt Publishing asked me to review Tom Ryder's book, Nagios Core Administration Cookbook, I was happy to do it. When I first found Nagios, I learned by reading the example configuration files, and I sadly followed their lead for way too long. I eventually learned that there are better ways, but I like resources that help people to learn faster than I did.

Tom's book follows the standard template (hah, template! Get it? that's a little Nagios humor for you) for books introducing Nagios by talking about the differences in the basic object definitions, with extra weight going into the hosts, services, and contacts, arguably the three most important object types. From that point, he moves swiftly into the normal "Cookbook" method of short, easily digestible (hah! Digestible! There's a cookbo...ok, I'll stop) recipes to get things done.

I really like that Tom made the decision early to create separate configuration files for individual hosts. I can't overstate how bad of an idea following the "hosts.cfg, services.cfg, contacts.cfg" examples are.

One of the things that I suppose was inevitable from the commercialization of Nagios is that there's a necessary distinction between Nagios Core (the free product) and Nagios XI (the pay-to-play supported product). In reading this book, I noticed that Tom continually writes "Nagios Core" whenever referring to the free product. I understand that it is necessary to distinguish between the two, but I wish this could have been accomplished with a disclaimer up front, to the effect of, "Whenever I say Nagios, I mean Nagios Core unless I explicitly state otherwise". It really only bothered me for the first chapter, then I started to glaze over it, but for the first chapter, it was kind of grating. It doesn't harm the quality of the text, though.

When you read a review like this, you probably care about two things. One, did the reviewer recommend it. And two, should you buy it. So here's my take.

This is a book targeting people who need to get things done with Nagios. This is not Wolfgang Barth's Nagios: 2nd Edition (which will teach you everything about everything Nagios-related). It's not trying to be. It's trying to give you small bits of information as you need them. In that, it does a good job.

If you don't have time to sit down and learn Nagios, but you want to get started with its configuration, then yes, you should pick this book up. You can teach yourself everything in it on your own, but it's way more economical on your time to see how other people (like Tom) have done what you're trying to do. His examples are good, short, and the comments are helpful. Also, I feel that he makes good choices in his recommendations on managing the configuration (which I personally think is much harder than actually writing the configuration). If you've had issues writing, organizing, or storing Nagios config, then you want to read all of the entries in Chapter 9.

Overall, the book has a lot of valuable recipes, and if you didn't know Nagios inside and out, but walked into a job where there was a Nagios infrastructure that you had to deal with, then you could do a lot worse than buying this book. If you think it sounds like you could use this book, then I recommend you get it, because it is what it's advertised to be: A Nagios cookbook.

Nagios Core Administration Cookbook is 366 pages long and includes over 80 recipes, full color screenshots, and well-commented example config and code. You can get the ebook from PacktPub for $25.49, and it comes in epub, mobi, and pdf formats. $49.99 will get you the physical book and a digital copy as well, if that's your thing, too, but honestly, I'd save the money and get the digital copy.

Also, you can check out Tom Ryder's blog at

  • Chris

    I'll probably grab that book, sounds great. One question: have you ever looked at Icinga? I hadn't heard of it until I was configuring aNag (Nagios client for Android) and it mentioned the different backends it supports. Some of the guys around here are stoked about the API support offered by icinga-web

  • Matt Simmons

    I've looked at Icinga. I like a lot of what they've improved, and the coolest thing is, by far, the API.

    My biggest complaint against Icinga is what they chose to fix. They've told me that they were going for the relatively low hanging fruit first, and that's a valid argument, but of all the things I see wrong with Nagios, the interface wouldn't be at the top of my list.

  • Ryan Miller

    This may be tangential to the book, since there's certainly a role for a modest work that just attempts to teach best practices for a specific tool, but this seems to ignore entirely the three actually hard things about monitoring:

    1. Monitoring services *in the way your applications use them* e.g. making sure that the DB is up for the application user coming from the app server's IP block, making a query in the application's tablespace, not just listening on a port

    2. Avoiding over or under-alerting, which tends to happen with fixed thresholds. Adaptive monitoring based on trends is often crucial, especially if you have too many servers or they're changing too rapidly for hand-tuning of thresholds

    3. Making sure your monitoring adapts as your servers are commissioned, move around, change roles, and are decommissioned. Building monitoring configs with an automation tool like puppet or chef isn't really optional in a modern environment, but lots of people don't know how to do it. And if your monitoring is set up in code, then it becomes extra-crucial to automatically test your code, lest a bug lead to server misconfiguration and monitoring misconfiguration so you don't find out about the server misconfiguration.

  • Viviana

    Saludos quisiera por favor que me ayuden con el libro si seria posible que lo pueda descargar lo necesito de urgencia