Hi,
since you already have a working master and client, including an Icinga CA, keep it this way.
Connect the Satellite to the Master
Your first step is to install the new satellite and connect it to the master, just like the client before. Do this by running the node wizard after installation, point it to the parent zone being your master, and the endpoints when asked.
Ensure that TLS certificates are signed and the configuration works properly. This includes editing the master’s zones.conf and adding the satellite zone and endpoint as shown in the three level cluster scenario in the docs.
The base concepts are needed to understand that this doesn’t matter on the second level this being a client or a satellite zone.
One the satellite works, start simple and create a zone directory called satellite
(or whatever name you’ve chosen in zones.conf) and put a host object there. Restart the master and let this being synced to the satellite. Wait up until a check result is retrieved and you can view it in Icinga Web 2.
One you’re sure cluster communication including config sync works. you’ll go the second step with connecting the client to the satellite instead of the master.
Connect the Client to the Satellite
This is fairly simple, since the TLS certificates are already signed, and the satellite’s public certificate is signed with the same CA as the client’s public certificate.
The main point is to navigate into the client’s zones.conf and edit the parent zone (which previously is the master zone) and also modify the endpoint details.
-object Endpoint "master.FQDN" {
-
-}
+object Endpoint "satellite.FQDN" {
+
+}
-object Zone "master" {
- endpoints [ "master.FQDN" ]
-}
+object Zone "satellite" {
+ endpoints = [ "satellite.FQDN" ]
+}
object Zone "client.FQDN" {
endpoints = [ "client.FQDN" ]
- parent = "master"
+ parent = "satellite"
}
Depending on your configuration and connection direction, you’ll need to set the host
attribute for the Endpoint again.
On the satellite’s end, you’ll need to do it vice versa, add the client endpoint and zone to the satellite’s zones.conf
Next up, restart the client and then the satellite and verify that they connect.
Client synced to Satellite, where it should be scheduled
The last important step is to move the Host object for the client from the master
zone into the satellite
zone.
This also influences the way how Endpoint and Zone objects for clients are distributed, a little trick allows you to just add them into the hosts.conf file on the master, and sync them to the satellite (followed by a restart).
First off, remove the client’s Zone and Endpoint from your satellite’s zones.conf.
Next, edit zones.d/satellite/hosts.conf
.
object Host "client.FQDN" {
address = "..."
vars.client_endpoint = name //convention that host name == endpoint name
}
object Zone "client.FQDN" {
endpoints = [ "client.FQDN" ]
}
object Endpoint "client.FQDN" {}
Now pick a service apply rule which uses command-endpoint, and put it into the satellite’s directory in zones.d as well.
Run a config validation, and then restart the master. Wait up until the first check is executed and inspect the check source.
Cheers,
Michael