The Icinga2 distributed monitoring documentation explains how to set up PKI certificates between different nodes, but assumes that the Slave / Satellite nodes can connect to the Master node and request their certificates.
There are clues in section 6.12.5 which indicate how to create certificates manually, but the documentation does not explain how to create and distribute certificates when the Master node is not contactable by the Satellites / Slaves (for example, you want to have your Master node on a private network, perhaps behind a router doing NAT).
Provided that either the Master can contact the Satellites / Slaves, or the Satellites / Slaves can contact the Master, then Icinga will be happy. Both is okay too.
These instructions show how to do this.
# icinga2 feature enable api # /etc/init.d/icinga2 reload
# icinga2 pki new-ca
# icinga2 pki new-cert --cn client --key client.key --csr client.csr
# icinga2 pki sign-csr --csr client.csr --cert client.crt
/etc/icinga2/pki/ca.crt /etc/icinga2/pki/client.key /etc/icinga2/pki/client.crt
to /etc/icinga2/pki on the target client machine.
# icinga2 feature enable api
accept_config = true accept_commands = true
These go inside the ApiListener "api" stanza.
object Endpoint "client CN as used when generating certificate" { host "client FQDN or IP address" } object Zone "Slave" { endpoints = [ "client CN as used when generating certificate" ] parent = "master Zone name" }
object Endpoint "master CN" { } object Zone "Master" { endpoints = [ "master CN" ] } object Endpoint "client CN as used when generating certificate" { host = "client FQDN or IP address" } object Zone "Slave" { endpoints = [ "client CN as used when generating certificate" ] parent = "master Zone name" }
Note that you do not define the Master endpoint's "host" value in the above definition (because the Client cannot connect to the Master).
Go up
Return to main index.