You are previewing Nagios Core Administration Cookbook.
O'Reilly logo
Nagios Core Administration Cookbook

Book Description

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.

  • 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.

    Table of Contents

    1. Nagios Core Administration Cookbook
      1. Table of Contents
      2. Nagios Core Administration Cookbook
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Understanding Hosts, Services, and Contacts
        1. Introduction
        2. Creating a new network host
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Creating a new HTTP service
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        4. Creating a new e-mail contact
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Verifying configuration
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Creating a new hostgroup
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Creating a new servicegroup
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        8. Creating a new contactgroup
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        9. Creating a new time period
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        10. Running a service on all hosts in a group
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      9. 2. Working with Commands and Plugins
        1. Introduction
        2. Finding a plugin
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Installing a plugin
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        4. Removing a plugin
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Creating a new command
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Customizing an existing command
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Using an alternative check command for hosts
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There's more...
          5. See also
        8. Writing a new plugin from scratch
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      10. 3. Working with Checks and States
        1. Introduction
        2. Specifying how frequently to check a host or service
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Changing thresholds for PING RTT and packet loss
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        4. Changing thresholds for disk usage
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There's more...
          5. See also
        5. Scheduling downtime for a host or service
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Managing brief outages with flapping
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Adjusting flapping percentage thresholds for a service
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      11. 4. Configuring Notifications
        1. Introduction
        2. Configuring notification periods
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Configuring notification for groups
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        4. Specifying which states to be notified about
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Tolerating a certain number of failed checks
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Automating contact rotation
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Defining an escalation for repeated notifications
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        8. Defining a custom notification method
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      12. 5. Monitoring Methods
        1. Introduction
        2. Monitoring PING for any host
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Monitoring SSH for any host
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        4. Checking an alternative SSH port
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Monitoring mail services
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Monitoring web services
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Checking that a website returns a given string
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        8. Monitoring database services
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        9. Monitoring the output of an SNMP query
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        10. Monitoring a RAID or other hardware device
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        11. Creating an SNMP OID to monitor
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      13. 6. Enabling Remote Execution
        1. Introduction
        2. Monitoring local services on a remote machine with NRPE
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Setting the listening address for NRPE
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Setting allowed client hosts for NRPE
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Creating new NRPE command definitions securely
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Giving limited sudo privileges to NRPE
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Using check_by_ssh with key authentication instead of NRPE
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      14. 7. Using the Web Interface
        1. Introduction
        2. Using the Tactical Overview
          1. Getting started
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Viewing and interpreting availability reports
          1. Getting started
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        4. Viewing and interpreting trends
          1. Getting started
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Viewing and interpreting notification history
          1. Getting started
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Adding comments on hosts or services in the web interface
          1. Getting started
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Viewing configuration in the web interface
          1. Getting started
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        8. Scheduling checks from the web interface
          1. Getting started
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        9. Acknowledging a problem via the web interface
          1. Getting started
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      15. 8. Managing Network Layout
        1. Introduction
        2. Creating a network host hierarchy
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Using the network map
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        4. Choosing icons for hosts
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more
          5. See also
        5. Establishing a host dependency
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Establishing a service dependency
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Monitoring individual nodes in a cluster
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        8. Using the network map as an overlay
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      16. 9. Managing Configuration
        1. Introduction
        2. Grouping configuration files in directories
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Keeping configuration under version control
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        4. Configuring host roles using groups
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Building groups using regular expressions
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Using inheritance to simplify configuration
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Defining macros in a resource file
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        8. Dynamically building host definitions
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      17. 10. Security and Performance
        1. Introduction
        2. Requiring authentication for the web interface
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Using authenticated contacts
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        4. Writing debugging information to a Nagios log file
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Monitoring Nagios performance with Nagiostats
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Improving startup times with pre-cached object files
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Setting up a redundant monitoring host
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      18. 11. Automating and Extending Nagios Core
        1. Introduction
        2. Allowing and submitting passive checks
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Submitting passive checks from a remote host with NSCA
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        4. Submitting passive checks in response to SNMP traps
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Setting up an event handler script
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Tracking host and service states with Nagiosgraph
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Reading status into a MySQL database with NDOUtils
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        8. Writing customized Nagios Core reports
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        9. Getting extra visualizations with NagVis
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      19. Index