Preface

Nagios Core, the open source version of the Nagios monitoring framework, is an industry standard for network monitoring hosted on Unix-like systems, such as GNU/Linux or BSD. It is very often used by network and system administrators to check the connectivity between hosts and to ensure that network services are running as expected.

Where home-grown scripts performing network checks can rapidly become unmaintainable and difficult for newer administrators to customize safely, Nagios Core provides a rigorous and configurable monitoring framework to make checks in a consistent manner and to alert appropriate people and systems of any problem it detects.

This makes Nagios Core a very general monitoring framework rather than an out-of-the-box monitoring solution, which is known to make it a little unfriendly to beginners and something of a "black box", even to the otherwise experienced administrators. Busy administrators charged with setting up a Nagios Core system will often set it up to send PING requests to a set of hosts every few minutes and send them an e-mail about any problem, and otherwise never touch it. More adventurous administrators new to the system might instate a few HTTP checks to make sure that company websites respond.

Nagios Core is capable of a great deal more than that, and this book's recipes are intended to highlight all of the different means of refining and controlling checks, notifications, and reporting for Nagios Core, rather than being a list of instructions for using specific plugins, of which there are many hundreds available online at the Nagios Exchange at https://exchange.nagios.org/. The book's fundamental aim is to get administrators excited about the possibilities of Nagios Core beyond elementary default checking behavior so that they can use much more of the framework's power and make it into the centerpiece of their network monitoring.

This also includes installing and even writing custom plugins beyond the standard Nagios Plugins set, writing and refining one's own checks, working with the very powerful Simple Network Management Protocol (SNMP), and the recording and reporting of performance data. It also includes refining notification behavior to only send appropriate notifications at appropriate times to appropriate people or systems, basic visualization options, identifying breakages in network paths, clever uses of the default web interface, and even extending Nagios Core with other open source programs. It includes all this in order to virtually check any kind of host property or network service on any network.

Where possible, this book focuses on add-ons written by the Nagios team themselves, particularly NRPE and NSCA. It omits discussion of popular forks of Nagios Core, such as Icinga. In the interest of conferring an in-depth understanding of advanced Nagios Core configuration, it also does not discuss any configuration frontends or wizards, such as NConf. Finally, as a Packt open source series book focusing on the use of the freely available Nagios Core, it also does not directly discuss the use of Nagios XI, the commercial version of the software supported by the Nagios team. This is done to instill a thorough understanding of Nagios Core itself, rather than to reflect the personal opinions of the author; curious administrators should definitely investigate all of these projects.

What this book covers

Chapter 1, Understanding Hosts, Services, and Contacts, gives you a basic idea of hosts, services, and contacts followed by the summary of this chapter.

Chapter 2, Working with Commands and Plugins, explains the architecture of plugins and commands, including installing new plugins and defining custom uses of existing ones. It also walks us through how to write a new plugin with Perl.

Chapter 3, Working with Checks and States, explains how Nagios Core performs its checks and how to customize that behavior, including scheduling downtime for hosts and services and managing "flapping" for hosts or services that keep going up and down.

Chapter 4, Configuring Notifications, explains the logic of how Nagios Core decides on what basis to notify, when, and to whom, including examples of implementing a custom notification method, escalating notifications that aren't fixed after a certain period of time, and scheduling contact rotation.

Chapter 5, Monitoring Methods, gives examples of the usage of some of the standard Nagios Plugins sets, moving from basic network connectivity checks with PING and HTTP to more complex and powerful checks involving SNMP usage.

Chapter 6, Enabling Remote Execution, shows how to use NRPE as a means of working around the problem of not being able to check system properties directly over the network, including a demonstration of the more advanced methods of check_by_ssh and check_mk.

Chapter 7, Using the Web Interface, shows some less-used features of the web interface to actually control how Nagios Core is behaving and to see advanced reports, rather than simply viewing the current state information. Use of the network map is not discussed here but in the next chapter.

Chapter 8, Managing Network Layout, explains how to make Nagios Core aware of the structure and function of your network with a focus on hosts and services depending on one another to function correctly, including monitoring clusters and using that layout information to build a network status map, optionally with icons and a background.

Chapter 9, Managing Configuration, shows how to streamline, refine, and control Nagios Core's configuration at a low level without the use of frontends. It focuses on the clever use of groups, templates, macros, and custom directives, and gives an example of generating configuration programmatically with the templating language m4.

Chapter 10, Security and Performance, shows how to manage simple access control, debugg runtime problems, and keep tabs on how Nagios Core is performing, and also contains a demonstration of basic monitoring redundancy.

Chapter 11, Automating and Extending Nagios Core, explains how to submit check results from other programs (including NSCA) to provide information about external processes via the commands file, and an introduction to a few popular add-ons (NDOUtils, MK Livestatus, NagVis, and Nagiosgraph).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.181.231