Hi,
Does the zone removal involve only editing the ‘zones.conf’ on the master?
Does it remove the hosts/services files inside the zone directory?
Thanks
Hi,
Does the zone removal involve only editing the ‘zones.conf’ on the master?
Does it remove the hosts/services files inside the zone directory?
Thanks
Hi,
when you want to remove a zone you have to delete the entries in the zones.conf
on the master, but as well on the agent/satellite. If you leave the entries on the agent/satellite the node will constantly try to re-connect to the master (assuming the the agent/satellite establish the connection to the master).
The removal will not remove files beneath /ec/icinga2/zones.d/yourzonename/
.
Best regards
Michael
Thanks Michael.
One last question…
The hosts/services would be removed from the monitoring/UI once the zone is removed. Is that correct?
Thanks
Once the zone is removed from the zones.conf
the zone directory in zones.d
will no longer be included, after a reload/restart the hosts/services from this zone should be gone in Icinga Web.
Best regards
Michael
It didn’t work. I think need to remove the zone directory under zones.d as well.
If I want to rename the zone directory to retain the config data, is it allowed?
Hi,
I just tested it, I removed a zone in my zones.conf
file and the directory will be ignored. The hosts and services from this zone are also gone in my Icinga Web.
[2020-11-20 08:58:48 +0100] warning/config: Ignoring directory '/etc/icinga2/zones.d/master' for unknown zone 'master'.
[2020-11-20 08:58:48 +0100] warning/config: Ignoring directory '/var/lib/icinga2/api/zones/master' for unknown zone 'master'.
Which version of Icinga 2 you are running?
It shouldn’t be a problem, but I wouldn’t do it since it can be confusing which configuration is active and which not. Why not move the configuration that you no longer need to another directory?
Best regards
Michael
It’s version 2.5. and a satellite zone to be removed
Hi,
the version 2.5 is fairly old, I highly suggest updating it.
If I remember correctly there was a bug that involved empty zones. If you clean or delete a zone directory it will not be deleted internally. Do the following create a empty.conf
in your zone and leave it empty, remove all other files from it or move it somewhere else, if you want to keep them.
Now reload the Icinga 2 daemon.
Best regards
Michael