Book Image

Nagios Core Administration Cookbook

By : Tom Ryder
Book Image

Nagios Core Administration Cookbook

By: Tom Ryder

Overview of this book

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 (18 chapters)
Nagios Core Administration Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Checking that a website returns a given string


In this recipe, we'll build on the basic web service monitoring established in the Monitoring web services recipe in this chapter, and learn how to create a command that uses the check_http plugin to ensure that a particular string is included as part of an HTTP response.

By default, there's no Nagios Core command defined to use the plugin in this way, so the recipe will include defining a command before using it as part of a service check.

This may be necessary if we're monitoring a website on a server that may not necessarily return a 404 Not Found or similar error that will flag a WARNING or CRITICAL state in Nagios; rather than merely checking if a document was found, we can check if it matches a string, to see if it resembles the particular document we expected.

This kind of setup is a nice complement to a suite of code unit tests for a website or web application.

Getting ready

You should have a Nagios Core 3.0 or newer server with at least...