The documentation for setting up a distributed monitoring setup using Icinga2 is all very well, but it's not as clear as I would like, so here's a simple step-by-step guide to adding a new node to your existing distributed Icinga2 setup.
It's assumed that:
These instructions work no matter whether you're setting up a simple "monitored endpoint" node, or an intermediate "satellite" node.
Create a PKI ticket
on the Master machine
# icinga2 pki ticket --cn FQDN.of.new.node
Copy the ticket number this command generates, for use later
Run the Node Wizard
on the new node, using answers as shown below:
# icinga2 node wizard
Satellite setup
CN = FQDN of the new node
Master Common Name = "parent" node for the new node (this might be the overall Master, might be an intermediate machine, depending on your setup)
Establish a connection to the master? "Yes" if the parent is reachable from this node.
Master endpoint host - FQDN or IP address of this machine's parent
Master connection for CSR auto-signing - FQDN or IP address of the Master (the one with the CA on it, where you created the ticket above)
enter the ticket number generated by the Master machine when requested
Accept config from master? "Yes"
Accept commands from master? "Yes"
Comment out the conf.d directory on the new node so that it won't be used:
Edit the /etc/icinga2/zones.conf file on the new node
Add the "global-templates" zone:
object Zone "global-templates" { global = true }
Set the correct Host, Endpoint and Parent names for this node and its parent node
you do not need to define any nodes higher than this node's direct parent
you should define the Host of an Endpoint if that Host is reachable from this node
you should not define the Host of an Endpoint if that Host is not reachable from this node
you can define one Host, or both, but zero will not work
the Endpoint names should match the CNs used in the PKI ticket creation
the Zone definitions must match exactly on this node and this node's master
Create a new Zone for the node
on the Master machine
# mkdir /etc/icinga2/zones.d/NEWZONE
Restart Icinga2 on the new node
# /etc/init.d/icinga2 restart
Reload Icinga2 on the Master
# /etc/init.d/icinga2 reload
Go up
Return to main index.