Steps to reproduce:
- Create a host with a host discovery rule
- Make discovered host(s) automatically being added to a hostgroup based on a macro returned from the discovery (example hostgroup = VM server pool)
- Change the discovered hostgroup (example: move VM into different server pool)
- Manually move the discovered host into the changed hostgroup before the discovery was ran again (hence zabbix did not have the chance to automatically move the host to this other hostgroup) (example: move discovered host into hostgroup = new VM server pool)
- Wait for the host discovery rule to run again, hence zabbix picking up the hostgroup change
Zabbix tries to insert the host into the new hostgroup, but since the host was already manually moved to that hostgroup, zabbix server reports a
and stops the discovery. Discovery changes are no longer picked up and discovery fails with a cryptic error claiming it cannot add the configured template to host '???' due to missing zabbix agent interface.
Zabbix noticing that the host is already in the desired host group and stop trying to add it again. Then continuing the discovery.