I have one master and one satellite, both are at version r2.10.4-1. I just got them talking but now I’m having an understanding problem.
First, to explain our objective: the satellite basically came about because our master server does not have much capacity and does other things, as well. So, it’s not the case that we have network delineated zones rather we want the satellite to run certain service checks while the master runs other service checks.
Here’s where I need help understanding: it seems the objects defined by the master need to be unique yet objects defined in zones.d
may depend on objects not in zones.d
. For example, let’s say I have a service check that I want to run on the satellite:
apply Service "ping4" {
import "generic-service"
check_command = "ping4"
assign where host.address
}
Once I add that to my zones.d
structure then I get this error:
[2020-02-14 07:30:45 -0800] critical/config: Error: An object with type 'Service' and name 'satellitehost.org!ping4' already exists (in /etc/icinga2/zones.d/satelliteZone/services.conf: 12:1-12:21), new declaration: in /etc/icinga2/conf.d/services.conf: 26:1-26:21
Location: in /etc/icinga2/conf.d/services.conf: 26:1-26:21
/etc/icinga2/conf.d/services.conf(24): * defined.
/etc/icinga2/conf.d/services.conf(25): */
/etc/icinga2/conf.d/services.conf(26): apply Service "ping4" {
^^^^^^^^^^^^^^^^^^^^^
/etc/icinga2/conf.d/services.conf(27): import "generic-service"
This makes sense since now the satellite has a ping4 Service and it knows itself as a Host so it ends up spawning a duplicate check.
My question is: what’s the normal way to approach the satellite configuration to avoid this kind of duplication? I also have templates that define, for example, a linux host or a windows host. Some services will be dependent on these templates. Is the approach to create new templates that are only applicable for the hosts and checks that will be ran on the satellite? In other words, how should the objects be kept unique between satellite and master?
Thanks for any ideas or document references!
Andy