In order to avoid reconfiguring all of the objects and managing two sets of configurations, it is possible to use multiple inheritances to manage the configurations efficiently. It can be used to separate parts that are common to both master and slave Nagios instances from information that is local to each Nagios instance. We'll assume each location will have a single Nagios instance, and it will either be a master or a slave.
For each location, there will be
remote templates. Slave instances will load the
local template for its own location and not load the configuration for other locations. Master instance(s) will load the
remote template for each location that will report information to this machine.
The actual objects will inherit a template for a specific check—such as the CPU load or the service template monitoring the HTTP server. They will also inherit a location's template—
remote, as they are the first items in the inheritance...