After a lot of experimentation, I’ve found a way to set up satellites that works. Most of the work can be done in director, which is great as my master is running as a container image and direct editing of configuration files is tricky.
These steps have been used successfully for multiple satellites and I haven’t yet found issues with them or the setup. Additionally, while I’m using a container image for the master, the satellites are set up as individually managed VMs.
Also note that when you’re working in Director, don’t deploy every change you make immediately. It should be okay, but I’ve only confirmed this works when deploying at the steps where I specifically indicate. These steps specifically configure a satellite that connects to the master, which works for the internal network where I developed these. Additionally, I have not tested with Windows Satellites. In theory, these steps will work as long as you convert them to the conventions on that OS.
-
Install Icinga on your intended satellite. If you’re following the official documentation, only do the steps in “Install Icinga 2” and “Set up Check Plugins”. Do not go past those steps.
-
In Director, create a new zone for your satellite. You can try using an existing defined zone, but I haven’t tested this scenario. The place for adding a zone can be found in the “Icinga Infrastructure” section. To match conventions for naming, use all lowercase letters and hyphens only in the name. Set the parent zone to “master”. Hold onto the zone name you are using, you will need it later.
-
Add a host entry for the new satellite. Do the steps just as if you are adding a normal host you would monitor. Do NOT set the agent configuration section yet. Keep note of the “hostname” you put in for the host, you will need it later. ADD/STORE the host.
-
In the newly created host, navigate to the “Agent” tab. Grab the agent script provided either by the download links or just copying the script text. Run this script on the intended satellite.
-
On the host, edit the file /etc/icinga2/zones.conf. In this file, you’ll see several objects defined. Find the Zone object with the same name as the host. Edit the name to be the name of the zone you created earlier. Save your changes and restart the Icinga2 service.
-
In Director, create a new Endpoint. This will also be found in the “Icinga Infrastructure” section. Set the name of the endpoint to the hostname of the host you created. Set the Cluster Zone to the name of the zone you created. You do not need to fill in any other fields. Once done, deploy the configuration.
-
Edit the host in Director. In the “Icinga Agent and zone settings” section, set “Cluster Zone” to the name of the zone you created. Set “Icinga2 Agent” to Yes. In the two new settings that appear, set “Establish connection” to No and “Accepts config” to Yes. Store the changes and then deploy the configuration.
That’s it! The satellite is now configured, and the majority of the configuration is stored/managed via Director. You can now add any hosts you need to the Cluster Zone and the satellite will be the check and scheduling source for it and any services attached.
The keys I found to getting it working are:
- Setting up the zone and endpoint before turning on the agent setting on the host. This prevents Director from creating the host-only zone that it otherwise does.
- Editing the zone.conf file on the satellite to have the created zone name. This puts it in the proper zone on start and allows the Icinga2 process on the satellite to get further configuration from the API once it connects to the master.