Management of configuration on a new environment


I am trying to learn Icinga and have some questions on how to best manage configuration (conf.d, zones.d, zones.conf, hosts.conf ++)

Current situation:

  • One node (master) with icinga2, icingadb, redis, mariadb, icingaweb and director.
  • The web setup is completed and i can access icingaweb.

Desired situation:

  • One master, two satellite zones, and one agent connected to each of those satellite zones.
  • Knowledge on how to manage configuration before running initial kickstart, and then afterwards using Director.

At the moment i am a little bit unsure about the next steps.

  • Do i run node setup/wizard for the rest of the nodes now, and then configure zones.conf or zones.d on the master node to reflect zones hierarchy? (conf.d should be commented out i guess)

  • And also do i need to edit both zones.conf and zones.d, or should i just use zones.d and comment out zones.conf in icinga.conf?

  • Will the master node send the configuration to the rest of the nodes, or do i need to edit configuration there also?

  • And finally, when master node is configured correctly, i can run kickstart (director) and after this i will be doing most of the configuration from director in icingaweb?

Hoping that someone can help get me on the right track :slight_smile:

Hello and welcome :slight_smile:

This is not possible. A host object can only be part of one zone.
If you (really) want the host to be checked by both satellites you would need to create two host objects in your config. Same goes for the agent. You would need two agent instances running on the host (both on different ports).

This! Run the node wizard on the two satellites and connect them to the master.
Run the node wizard on the agent host (if Linux) and connect to one satellite zone.
If it is Windows use the graphical installer (which basically is the node wizard).
After that add the satellite zones and endpoints to your masters zones.conf and the agent host/endpoint/zone object to zones.d/whatever-sat-zone/hosts.conf on the master.

Use the zones.conf file for zone/endpoint configuration and zones.d for monitoring config (hosts, services, templates, notification …)

The master will sync the config to the nodes. Only edit the config on the (primary, if HA) master.
The synced config will end up in /var/lib/icinga2/api/... on the satellites and agents.

Yes. If you plan on using the Director I would only configure the zones of the satellites in the masters zones.conf.
The agent host can then be configured with the Director.

1 Like

Thanks a lot, this is most helpful :slight_smile:
I will try to implement according to your instructions.

Thanks for taking the time to answer me, and have a nice day :slight_smile:

You could also configure both satellites in one HA zone. That allows agents to connect to both satellites.