How to decommission icinga endpoints & zones which are obsoleted, what are the steps ? Please suggest

1, How to remove obsoleted/decommission endpoints & zones from icinga environment.
2. which is the best practice for that ?

In the director I first disable the host and later if the host is really decommissioned I delete it.

The director comments the host and other related things like the zone out on disabling and deletes the lines on deletion.

  1. Remove all related hosts/services/templates/commands of the zone
  2. reload icinga2 service (deploy config)
  3. remove endpoint and zone from masters zones.conf
  4. repeat 2.
  5. run directors kickstart wizard. this will remove the endpoint and zone from the director
    1. might need to be run twice as the director might “stumble” if it tries to remove the zone before the endpoint.

Reloading the serviec/deploying the config might need some (more) time depending of the size of the setup. If done via some script or e.g. via Ansible keep that in mind. There might be the need for a “sleep” to finish the reload before continuing.