-
Problem report
-
Resolution: Fixed
-
Trivial
-
5.0.3, 5.2.0alpha2
-
None
-
Sprint 68 (Sep 2020), Sprint 69 (Oct 2020)
-
0.25
It looks like on Oracle auto registration is re-run every time when the agent requests the list of active checks for hosts with empty meta data. Whereas on MySQL auto registration is re-run only when some of the hosts parameters (such as name, IP etc) changed.
zabbix_server/trapper/active.c contains the following code in get_hostid_by_host():
if (SUCCEED == DBis_null(old_metadata) || 0 != strcmp(old_metadata, host_metadata) || (ZBX_CONN_IP == flag && ( 0 != strcmp(old_ip, interface) || old_port_v != port)) || (ZBX_CONN_DNS == flag && ( 0 != strcmp(old_dns, interface) || old_port_v != port)) || (old_flag_v != flag)) { db_register_host(host, ip, port, sock->connection_type, host_metadata, flag, interface); }
It checks DBis_null(old_metadata). old_metadata can be NULL or '\0' on MySQL but is '\0' for Oracle even in case of null value from the DB (judging by zbx_db_is_null)