Foreword to the second edition
As soon as the stable Nagios version 3.0 appeared, as can be expected after going to press, the question was raised: Nagios 2 or Nagios 3? For those just starting out with Nagios, Nagios 3.0 is a safe bet. Even the release candidate 3.0rc1 was sufficiently stable for production environments, and you can benefit directly from the new features, rather than having to get used to them later on.
If you are already using Nagios 2 in a sizable environment, then you'll surely be thinking, Never touch a running system . Why change if your existing system is running smoothly? But there has been further development on Nagios 2 since the first edition of this book appeared, and various bugs have been fixed.[] So it is perhaps advisable to change to the current Nagios 2 version, and then wait and see how things develop.
On the other hand, Nagios 3.0 does contain a number of improvements. In particular where there are performance problems in large environments, this major version provides some adjusting screws that can help the system to achieve a higher performance through its greatly improved hostcheck logic, thanks to the caching of check results and a series of optimization parameters. Otherwise, it is smaller changes, ones that are not so obvious, that distinguish Nagios 3.0 from Nagios 2. Many things, often hardly noti-cable, combine to make your work with Nagios 3.0 easier, and sometimes more pleasant as well. You can get to know and appreciate all these small details best if, as a Nagios 2 administrator, you just try out Nagios 3. Newcomers will probably take all these small improvements for granted, and not even notice them.
Fortunately, converting from Nagios 2 to Nagios 3.0, as described in from page 693, is relatively simple, and you can continue using your existing configuration unchanged in most cases.
What's New in the Second Edition?
The second edition deals with Nagios in both version 2.x and version 3.0, since there is no difference in the basic principles. At first glance the structure of the book looks the same, as do the contents of many chapters. Nevertheless, much has changed, even in the chapters that existed in the first edition. Nearly all the chapters were revised and updated to do justice to the current state of development of the tools introduced, but also to take into account the differences between Nagios 2.x and Nagios 3.0.
The Monitoring Servers chapter was completely revised and expanded, in particular where the NSClient++ tool is concerned. The chapter on the processing of performance data was also extended. A new tool was added, in the shape of PNP, and the description of the NagiosGrapher was brought right up to date. Of the newly introduced plugins, check_logfiles
by Gerhard Lauer and check_multi
by Matthias Flacke in particular deserve special mention, and the author considers these to have great potential. But caution is advised: both are for the advanced user.
There is a new chapter on NagVis, with which you can define a Web interface based on your own images or graphics, with complete freedom in its design. NagVis requires the database interface NDOUtils, to which a separate chapter is devoted.
The EventDB reveals a database-supported approach to processing events as an alternative to the classic log file check. A separate chapter is also devoted to this. The chapters Writing Your Own Plugins and Determining File and Directory Sizes are also new, and describe step by step how to write your own Perl plugin, introducing the Perl module Nagios::Plugin
in so doing. To optimize the performance of Perl scripts, Nagios provides its own interpreter, which is also given its own chapter.
A chapter called What's New in Nagios 3.0? can't be missing, of course, which compactly summarizes all the changes made compared to Nagios 2.x. For the sake of completeness, there is a new chapter on macros in the Appendix. This compares the various macro types and explains their intended use.
A chapter on performance optimization was also included. It certainly doesn't contain any patent remedies, since this is just not possible, given the wide range of monitored environments and scenarios for use. But it does take a look at the problem zones of Nagios, and provides some tips on where to look for support.
The fact that authentification on the Nagios Web interface does not have to be restricted to the simple basis
authentification described in the installation chapter is demonstrated by another new chapter about Single-Sign-On in Microsoft Active Directory environments.
[] Nagios 2.10 was the current version at the time of going to press.
Information Sources on the Internet
Despite an increase of over 200 pages, the book cannot describe all the existing tools and possibilities for use. The Internet provides a wealth of information that is useful while, or after, studying this book. The most important sources are listed here.
The Nagios homepage at http://www.nagios.org/
The homepage of Nagios plugins at http://www.nagiosplugins.org/
The Nagios community at http://www.nagioscommunity.org/
http://www.nagiosexchange.org/ as an exchange platform for plug-ins
The original mailing lists at http://www.nagios.org/support/mailinglists.php
Introduction
It's ten o'clock on Monday morning. The boss of the branch office is in a rage. He's been waiting for hours for an important e-mail, and it still hasn't arrived. It can only be the fault of the mail server; it's probably misbehaving yet again. But a quick check of the computer shows that no mails have got stuck in the queue there, and there's no mention either in the log file that a mail from the sender in question has arrived. So where's the problem?
The central mail server of the company doesn't respond to a ping
. That's probably the root of the problem. But the IT department at the company head office absolutely insists that it is not to blame. It also cannot ping the mail node of the branch office, but it maintains that the network at the head office is running smoothly, so the problem must lie with the network at the branch office. The search for the error continues...
The humiliating result: the VPN connection to head office was down, and although the ISDN backup connection was working, no route to the head office (and thus to the central mail server) was defined in the backup router. A globally operating IT service provider was responsible for the network connections (VPN and ISDN) between branch and head office, for whom something like this "just doesn't happen." The end result: many hours spent searching for the error, an irritated boss (the meeting for which the e-mail was urgently required has long since finished), and a sweating admin.