I’ve just finished reading “Learning Nagios 3.0” by Wojciech Kocjan and published by Packt Publishing, and this is a great book for anyone interested in nagios. This is a beginner level book that introduces nagios to new users interested in monitoring their infrastructure, but it will also present advanced features that even more experienced sysadmins can benefit from. All these in a pretty compact book, at 301 pages.
The topics are as follows:
- Installation and Configuration
- Using the Nagios Web Interface
- Overview of Nagios Plugins
- Advanced Configuration
- Notifications and Events
- Passive Checks and NSCA
- Monitoring Remote Hosts
- Advanced Monitoring
- Extending Nagios
Nagios is a real veteran in network monitoring with the first version released more than 10 years ago in March 1999. Some would say that not much has changed during the past few years in Nagios, but even so nagios is still the top choice for network professionals and sysadmins when it comes to build a monitoring solution for their infrastructure. The changes that the latest branch 3.x has brought to the table are subtle ones (like the interface is still the same old cgi one), but Wojciech does a good job in showing how we can take advantage of those to better design our nagios installation (using macros, inheritance, dependencies, etc.)
As the book is primary targeted towards new users looking into nagios, it does start by presenting all the usual stuff you would expect: starting with the installation of nagios on all major linux distros (rpm and deb based ones) from OS packages or by compiling it from sources. Next the author shows us how to configure the nagios daemon and start using the web interface. All basic nagios objects and concepts are covered: hosts, services, commands, time periods, contacts. Even from the first part of the book Wojciech will layout a good structure describing how to use templates and object inheritance in a smart way.
The next part presents the real strength of nagios: its plugins. The standard plugins are all presented in great detail, but also it describes how we can find other plugins and use them or even write our own plugins. Also we will learn the basic ways to monitor remote systems using SNMP, NSCA, NRPE or over ssh and where each of these methods is useful.
Chapter 5 “Advanced Configuration” and 6 “Notifications and Events” can be very useful even to experienced nagios sysadmins. You might find yourself trapped using some old configurations and after reading these chapters you will wonder why haven’t you done it like that a long time ago (probably this was not supported at that time ;) ). Basically the author describes very good ideas on how to layout your configuration files so they can scale well and also to be easily automated by external tools. Also dependencies and inheritance if defined in a smart way could save a lot of the configuration and give your setup a better clarity. Notifications, escalations and adaptive monitoring are described in great detail also. The “Distributed Monitoring” part from Chapter 10 should be very useful to people that need to scale nagios beyond a single monitoring machine using several monitoring machines (master, slaves) with real examples. Since nagios doesn’t provide such a functionality out of the box (master/slave) this is quite useful and even if you will not use it quite like that, it might give you some good ideas on how nagios can be scaled.
Overall this is a great book that both new users and advanced nagios admins can benefit from. Having a good monitoring system in place is vital for most organizations these days, and if you choose to use nagios, this book is definitely a good place to start when building your nagios system.