ExportXMLWordPrintable

      Summary

      Today an active Zabbix agent (Agent and Agent 2) is bound to a Zabbix host only through its host name (Hostname / HostnameItem). Autoregistration, active check retrieval and data acceptance all depend on that one string matching the technical host name in Zabbix.

      The host name is a mutable, human-managed attribute. Using it as the only identity key causes data loss, duplicate hosts, monitoring gaps and data mixing in large or dynamic environments.

      Other monitoring platforms separate identity from name. Dynatrace OneAgent, for example, identifies a host by a configurable unique factor. The default is the OS machine-id, and the hostname or primary NIC MAC address are alternatives. The display name can then change freely without breaking the host's continuity.

      This request asks Zabbix to support a configurable, stable host identifier for active agents, used for autoregistration and host matching, with the host name kept as a renameable attribute.

      Current behaviour

      1. The agent sends Hostname with every active check request and data upload.
      2. The server or proxy looks up the host by technical name.
        • If it is found, data is accepted.
        • If it is not found and autoregistration is configured, a new host is created.
      3. Nothing else identifies the machine. The server cannot tell "a renamed known machine" apart from "a brand-new machine" or "a different machine that happens to use the same name."

      Problems caused by hostname-only identity

      1. A host rename breaks monitoring and loses history.
      When an OS hostname changes because of a naming convention update, a domain migration, or rebuilding from a different standard, the agent starts reporting under a new name. Several things follow:

      • The existing Zabbix host stops receiving data and its items go unsupported or nodata triggers fire.
      • Autoregistration creates a brand-new host with no history, trends, problem history, SLA data or maintenance assignments.
      • Dashboards, maps, services/SLA trees, reports and external integrations (CMDB, ITSM, AIOps) still point to the old host ID.
      • Operators must manually rename the Zabbix host and reconfigure the agent, or merge two hosts, which Zabbix cannot do.

      2. Duplicate hosts are created by autoregistration.
      Every identity change produces an orphan host plus a new one. Over time this creates:

      • stale hosts that must be found and cleaned up manually,
      • inflated host counts and license or capacity reports,
      • false "host unavailable" or nodata alerts from the orphaned copy.

      3. Name format drift creates new hosts even without a real rename.
      Small changes to how the name is reported produce a different identity:

      • short name vs FQDN, for example when HostnameItem=system.hostname behaviour changes or a DNS suffix is added or removed,
      • case differences (Windows SRV01 vs srv01),
      • truncation or character differences across agent versions or OS changes.

      4. Two machines with the same hostname collide.
      This happens with machines in different domains, tenants or sites, or with leftovers from cloning or DR copies. Because both report the same name, one of the following occurs:

      • data from two different machines is written to the same host, causing silent data corruption and misleading graphs and triggers, or
      • one machine is never monitored, and nobody notices.

      5. Machine replacement and in-place rebuilds cannot be handled correctly.
      There is no way to say whether a host is the same logical role on new hardware or a different machine. Organisations need to choose:

      • Follow the machine (identity = machine-id or SMBIOS UUID): history follows the physical or virtual instance, even if it is renamed.
      • Follow the role (identity = hostname): today's behaviour.

      Today only the second option exists.

      6. Autoregistration actions are limited.
      Actions can match only on host name and host metadata. They cannot detect "this is a known machine with a new name" in order to update the existing host instead of creating a new one.

      7. Inventory, CMDB and ITSM correlation is fragile.
      Integrations that use the Zabbix host as the anchor for a configuration item (ServiceNow, Jira, Planview and similar) break on every rename. A stable hardware or OS identifier is exactly what CMDBs use for reconciliation, such as serial number or SMBIOS UUID. Zabbix has no first-class field for it.

      8. Operational load at scale.
      In environments with thousands of agents, renames during domain consolidation, mergers or OS refresh projects create large waves of duplicates and gaps. This needs scripting against the API to clean up, with history lost in the process.

      Proposed solution

      Agent side (Agent and Agent 2)

      Add a new configuration parameter, for example:

      HostIdentitySource=hostname   # default, current behaviour (backward compatible)
      # Possible values:
      #   machineid      Linux: /etc/machine-id ; Windows: MachineGuid (HKLM\SOFTWARE\Microsoft\Cryptography)
      #   smbios_uuid    system/product UUID from SMBIOS/DMI
      #   mac            MAC address of primary / specified interface
      #   custom         value of HostIdentity= or HostIdentityItem=
      HostIdentity=
      HostIdentityItem=
      HostIdentityInterface=        # for 'mac' source
      

      The agent sends the identity value alongside Hostname in active check requests, data uploads and autoregistration requests.

      Server / proxy side

      • Add a new, indexed host identity field on hosts. It should be visible and editable in the frontend and API, and unique per host where set.
      • Host lookup order for active agents:
        1. If the agent sends an identity and a host with that identity exists, use that host.
        2. Otherwise, fall back to matching by host name, which is the current behaviour.
      • When a host is matched by identity but the reported hostname differs, behaviour is configurable globally and per autoregistration action:
        • Update the host's technical and/or visible name to the new value, keeping host ID, history, trends and configuration,
        • Keep the Zabbix name and only record the reported name, for example in inventory or a host tag,
        • Generate an event or internal problem "Agent reported hostname changed from X to Y".
      • When a host name matches but the identity differs, generate an event such as "Host identity conflict: possible duplicate or cloned machine". It should be configurable whether to accept data, reject it, or autoregister as a new host. This removes silent data mixing.

      Autoregistration actions

      • Add new conditions: Host identity, Host identity is known/unknown, Reported hostname differs from host name.
      • Add new operations: Update host name, Set host identity.

      Frontend / API

      • Add the identity field to host.get, host.create, host.update, the host list filter, host inventory and the latest data and host views.
      • Show the reported hostname vs the configured host name where they differ.

      Edge cases to consider

      • Cloned VMs and golden images with identical /etc/machine-id. This is a known problem in the industry. Mitigations are the conflict detection above, plus documentation that machine-id should be regenerated on clone. smbios_uuid is often more reliable for VMs.
      • Containers and ephemeral hosts. These may need custom or hostname identity. Hostname stays the default so nothing changes for them.
      • OS reinstall. This changes the machine-id. Users who want history to survive a reinstall can choose smbios_uuid, mac or custom.
      • NIC replacement or MAC changes with the mac source. This should be documented as a trade-off.
      • Security. The identity is not an authentication mechanism. PSK or certificate authentication still applies. Conflict detection prevents a spoofed identity from silently taking over another host's data.
      • Proxies and proxy groups. The identity must be passed through and kept consistent during host reassignment between proxies.

      Backward compatibility

      • The default stays HostIdentitySource=hostname, so existing deployments behave exactly as today.
      • Older agents that do not send an identity fall back to hostname matching.
      • No database change is required for hosts without an identity; the field is nullable.

      Benefits

      • Host renames no longer break monitoring or lose history.
      • No duplicate or orphan hosts from autoregistration.
      • No silent data mixing between machines with the same hostname.
      • A stable anchor for CMDB, ITSM and AIOps integrations.
      • Feature parity with commercial platforms (for example Dynatrace) that customers migrating to Zabbix expect.
      • Much less manual and API cleanup in large enterprise environments.

            Assignee:
            Vladislavs Sokurenko
            Reporter:
            Christos Diamantis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: