Nagios Core Administration Cookbook

Nagios Core Administration Cookbook

Language: English

Pages: 360

ISBN: 1849515565

Format: PDF / Kindle (mobi) / ePub


The ideal book for System Administrators who want to move their network monitoring to an advanced level. This book covers the powerful features and flexibility of Nagios Core, and its recipes can be applied to virtually any network.

Overview

  • Monitor almost anything in a network.
  • Control notifications in your network by configuring Nagios Core.
  • Get a handle on best practices and time-saving configuration methods for a leaner configuration.
  • Use the web interface to control notification behaviour on the fly and for scheduled outages, without restarts
  • Pull Nagios Core's data into a database to write clever custom reports of your own devising

In Detail

Network monitoring requires significantly more than just pinging hosts. This cookbook will help you to comprehensively test your networks' major functions on a regular basis.

"Nagios Core Administration Cookbook" will show you how to use Nagios Core as a monitoring framework that understands the layers and subtleties of the network for intelligent monitoring and notification behaviour.

Nagios Core Administration Guide introduces the reader to methods of extending Nagios Core into a network monitoring solution. The book begins by covering the basic structure of hosts, services, and contacts and then goes on to discuss advanced usage of checks and notifications, and configuring intelligent behaviour with network paths and dependencies. The cookbook emphasizes using Nagios Core as an extensible monitoring framework. By the end of the book, you will learn that Nagios Core is capable of doing much more than pinging a host or to check if websites respond.

What you will learn from this book

  • Finding, installing, and writing your own plugins, and learning to reference them as Nagios Core commands for use as host and service checks, including workarounds for making checks through difficult network layouts such as those using Network Address Translation.
  • Managing notifications to send the right kind of notifications to the right people at the right time, and defining contact methods besides simple email messages, including an example of automatic contact rotation.
  • In-depth examples of using the standard set of Nagios Plugins for common network monitoring needs, with discussion of generic methods for monitoring the results of SNMP queries.
  • Remote monitoring methods to handle the situations where Nagios Core cannot directly check a service's status over the network, to check things such as database servers that only listen locally, or hardware devices with no SNMP OIDs exported.
  • Defining network structure and dependencies in Nagios Core to enable it to perform its notification behavior more intelligently, and allow you to very quickly find the "root" of particular problems; also how to reflect this structure in the network map once defined, and even decorate it.
  • Best practices for managing Nagios Core configuration to make it leaner, more robust, and better suited to programatically generating configuration as specified by other systems.
  • Automating other interactions with Nagios Core, including using passive checks to track tasks being performed both locally and in other parts of the network, or running scripts automatically in response to checks; also includes discussion of developing your own reports or vizualisations using automatically exported data from the system.

Approach

This book is written in Cookbook style, beginning with recipes based on basic structure which gradually progresses towards using Nagios Core as a monitoring framework.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: January 2013 Production Reference: 1180113 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-84951-556-6 www.packtpub.com Cover Image by

enable_flap_detection directive set to 1 in its own definition.In the latter case, the configuration for the host or service might look similar to the following code snippet: define host { ... flap_detection_enabled 1 } define service { ... flap_detection_enabled 1 } If any of the preceding configuration was changed, validate the new configuration and restart the Nagios Core server: # /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg # /etc/init.d/nagios restart Check

to do this, which we also defined ourselves in a syntax very similar to the check_ssh definition. The difference is that the command accepts an argument which is used as a value for the -p option to the check_ssh plugin, to check the specified port number; in this case, TCP port 5022, rather than the default of port 22. There's more... Since arguments in Nagios Core can include spaces, we could also have defined the service check as follows, without having to define an extra command:

out of. To send us general feedback, simply send an e-mail to , and mention the book title through the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors. Customer support Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase. Downloading the example

ithaca.naginet, which might be defined as follows: define host { use linux-server host_name ithaca.naginet alias ithaca address 10.128.0.21 } You will also need a working Nagios Core web interface to check that passive checks are enabled, and to try out the recipe's method of submitting passive checks. The recipe will be in two parts: enabling and configuring the service for passive checks only, and actually submitting a passive check via the web interface. In the There's more... section,

Download sample

Download