Hello.
Zabbix version 7.4.15. I don’t know if this happened before or if it started after some update.
Zabbix does not allow you to delete a host if it has discovery rules. Foreign Key error. For example:
Error in query [DELETE FROM items WHERE itemid=134694] [Cannot delete or update a parent row: a foreign key constraint fails (`zabbix`.`item_discovery`, CONSTRAINT `c_item_discovery_3` FOREIGN KEY (`lldruleid`) REFERENCES `items` (`itemid`))] [zabbix.php:17 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerHostMassDelete->doAction() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHost->delete() → CHost::deleteForce() → CDiscoveryRule::deleteForce() → DB::delete() → DB::deleteByPkIds() → DB::deleteByIdField() → DBexecute() → trigger_error() in include/db.inc.php:249]
Ошибка при выполнении SQL запроса "DELETE FROM items WHERE itemid=134694"

What happened is not clear. Whether something in the database broke after some update, or whether it has always been like this, I don’t know.