Using templates for distributed monitoring
Multiple inheritances can be used to manage the configurations for distributed Nagios setups. This can help avoiding reconfiguring all of the objects and managing two sets of configurations. Multiple inheritance 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 that is a slave instance to the central Nagios instance.
For each location, there will be local
and 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 hosts and services 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...