Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-18364

Inconsistent autoregistration behaviour for hosts w/o metadata on MySQL vs Oracle

XMLWordPrintable

    • 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)

            viktors.tjarve Viktors Tjarve
            Kalimulin Alex Kalimulin
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: