Using inheritance to simplify configuration

In this recipe, you'll learn how to use inheritance to handle the situation where hosts and services share a lot of values in common, leading to a large amount of undesirable redundancy in configuration.

Some Nagios objects, particularly hosts and services, have a rather long list of possible directives and the default values for these are not always suitable. It's therefore worthwhile to be able to declare the values you want for these directives once and then spend only a few lines on the actual host definition by copying these values from a template, making the configuration shorter and easier to read.

The previous examples in this book demonstrated the use of this in suggesting you inherit from the ...

Get Nagios Core Administration Cookbook - Second Edition 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.