Introduction
A major downside of Nagios Core's configuration being so flexible is that without proper management, a configuration can easily balloon out into hundreds of files with thousands of objects, all having unclear dependencies. This can be frustrating when attempting to make significant changes to a configuration, or even for something as simple as removing a host, sifting through dependencies to find what's causing errors in the configuration and prevents you from restarting Nagios Core.
It's therefore important to build your configuration carefully using as much abstraction as possible, to allow adding, changing, and removing hosts and service definitions from the configuration painlessly, and to avoid duplication of configuration. Nagios Core provides a few ways of dealing with this, most notably in the judicious use of groups and templates for the fundamental objects. Duplication of network-specific and volatile data, such as passwords, is also to be avoided; it's best done with...