Book Image

Nagios Core Administration Cookbook - Second Edition

By : Tom Ryder
Book Image

Nagios Core Administration Cookbook - Second Edition

By: Tom Ryder

Overview of this book

Nagios Core is an open source monitoring framework suitable for any network that ensures both internal and customer-facing services are running correctly and manages notification and reporting behavior to diagnose and fix outages promptly. It allows very fine configuration of exactly when, where, what, and how to check network services to meet both the uptime goals of your network and systems team and the needs of your users. This book shows system and network administrators how to use Nagios Core to its fullest as a monitoring framework for checks on any kind of network services, from the smallest home network to much larger production multi-site services. You will discover that Nagios Core is capable of doing much more than pinging a host or to see whether websites respond. The recipes in this book will demonstrate how to leverage Nagios Core's advanced configuration, scripting hooks, reports, data retrieval, and extensibility to integrate it with your existing systems, and to make it the rock-solid center of your network monitoring world.
Table of Contents (18 chapters)
Nagios Core Administration Cookbook Second Edition
About the Author
About the Reviewer

Grouping configuration files in directories

In this recipe, you'll learn how to group configuration files in directories to greatly ease the management of configuration. We'll do this by configuring Nagios Core to load every file it can find ending with a .cfg extension in a given directory, which includes recursing through subdirectories. The end result will be that to have Nagios Core load a file, we only need to include it somewhere in this directory with an appropriate extension; we don't need to keep track of which files are being loaded and where, nor add any new definitions in nagios.cfg.

Getting ready

You will need to have a server running Nagios Core 4.0 or later and access to the command line to change its configuration. You should be familiar with the loading of individual configuration files using the cfg_file directive in /usr/local/nagios/etc/nagios.cfg.

In particular, you should have a directory prepared that contains all of the configuration items you would like to be loaded...