Grouping configuration files in directories

In this recipe, we'll learn 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, including recursing through subdirectories. The end result will be that to have Nagios Core load a file, we only need to include it somewhere in that directory with an appropriate extension; we don't need to define exactly which files are being loaded in nagios.cfg.

Getting ready

You will need to have a server running Nagios Core 3.0 or later, and have access to the command line to change its configuration. You should be familiar with the loading of individual configuration ...

Get Nagios Core Administration Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.