ExportXMLWordPrintable

      Problem

      In large estates (thousands of agents) the agent lifecycle is managed outside Zabbix: configuration files, user parameters, Agent 2 plugins and agent upgrades are rolled out through automation tools (Ansible, SCCM, GPO, Puppet, etc.) that are usually owned by different teams (Windows, Linux, middleware, network).

      Agent data can be partially collected today through inventory or custom items and presented in custom tables or dashboards, but Zabbix has no dedicated fleet management view, as enterprise platforms such as Elastic (Fleet), Dynatrace and Datadog (Fleet Automation) provide for their agents.

      Zabbix already knows every agent through autoregistration, active checks and passive polling, but it cannot:

      • change an agent parameter or user parameter centrally;
      • deploy or update Agent 2 loadable plugins;
      • roll out a new configuration to thousands of agents in a controlled, staged way;
      • upgrade agents at scale;
      • detect configuration drift between what is expected and what each agent actually runs.

      The biggest operational impact is on urgent actions. When an agent bug or a CVE requires an immediate upgrade or configuration change, the monitoring team depends on the release cycles, change windows and automation tools of several other teams. A change that should take minutes takes days or weeks, and the fleet is left in a mixed state of versions and configurations in the meantime.

      Proposed functionality

      1. Agent fleet view (Data collection -> Agents): a dedicated view with host, agent variant (1/2), version, OS/arch, loaded plugins, mode (active/passive/both), last contact, proxy/proxy group, assigned profile, effective configuration hash, compliance state. Filtering, grouping and bulk actions (apply profile, upgrade, restart) directly from the view.
      2. Agent configuration profiles: a new object holding agent parameters (UserParameter, Plugins.*, AllowKey/DenyKey, Timeout, BufferSize, LogFileSize, DebugLevel, HostMetadata, etc.). Profiles are assigned by host group, host tags or on autoregistration (new action operation "Assign agent profile"). Profiles can be layered (global -> group -> host) with explicit precedence.
      3. Managed include file: the agent writes received parameters into a dedicated managed include file (e.g. zabbix_agent2.d/zabbix_managed.conf). The local configuration file remains the baseline and is never overwritten.
      4. Parameter classes: each parameter is classified as hot-reloadable (applied without restart, e.g. UserParameter, DebugLevel), restart-required, or local-only (never remotely manageable: Server, ServerActive, ListenPort, ListenIP, all TLS* parameters, AllowRemoteManagement itself).
      5. Drift detection: the agent reports the hash of its effective configuration; Zabbix compares it to the assigned profile and exposes compliance through a built-in internal item and trigger.
      6. Safe apply with rollback: the agent keeps a last-known-good configuration. If after applying a profile it fails to start, fails to load a plugin or cannot reach server/proxy within a defined window, it reverts automatically and reports the failure.
      7. Agent upgrade and plugin deployment: staged rollout by host group, optional maintenance-window binding, package checksum + signature verification, rollback when the agent does not report the target version in time. Packages are served by server/proxy so that agents in isolated segments do not need repository access.
      8. Remote restart / reload as audited operations, also usable from actions and scripts.
      9. API coverage for all objects and operations (agentprofile.*, agent.get, agent.apply, agent.upgrade), so the whole workflow can be managed as code.
      10. Security:
        • new agent parameter AllowRemoteManagement=0|1 (default 0, opt-in);
        • remote management only over encrypted connections (PSK or certificate); refused on unencrypted connections;
        • allowlist/denylist of remotely manageable parameters on the agent side;
        • dedicated user-role permissions (view fleet / edit profiles / apply / upgrade);
        • every change recorded in the audit log with before/after diff.

      Suggested implementation (protocol)

      No change to the protocol header is needed (FLAGS stay transport-level: 0x01 protocol, 0x02 compression, 0x04 large packet). The feature fits into the existing JSON payloads, following the same pattern used for remote commands on active agents in 7.0 and for incremental configuration sync in 6.4.

      Active mode (agent-initiated, preferred - works behind NAT/firewalls):

      • "active checks" request: agent adds an optional object, e.g.
        "agent_mgmt": {"capable": 1, "profile_revision": 7, "config_hash": "<sha256>", "plugins": ["MSSQL","PostgreSQL"], "os": "windows", "arch": "x86_64"}
        
      • "active checks" response: server includes "agent_mgmt" with the profile, upgrade offer or restart/reload request only when profile_revision differs, exactly like config_revision handling (no extra traffic when unchanged). Older agents ignore the unknown field, as they already do for "commands".
      • Result reporting: in the next "agent data" request (same mechanism as remote command results) or in a new "agent mgmt status" request.
      • "active check heartbeat" carries config_hash so drift is detected even between refreshes.

      Passive mode (server/proxy-initiated):

      • New request types on the agent listen port besides "passive checks":
        • "agent inventory" - read-only, returns version, variant, plugins, config hash, capabilities;
        • "agent mgmt apply" - pushes profile / restart / upgrade offer;
        • "agent mgmt status" - returns apply result.
      • Executed by the existing asynchronous agent pollers; existing Server= allowlist plus mandatory TLS applies.
      • Agents that do not recognise the request answer with an error, and server marks the interface as not management-capable (same idea as the existing old-protocol failover).

      Mixed mode: per host, one management channel is selected (active preferred, passive fallback), so the same profile is never applied twice.

      Proxies / proxy groups: profiles and packages are delivered to proxies with the regular proxy configuration sync and served locally to agents; results flow back with proxy data. This keeps behaviour correct when hosts move between proxies in a proxy group.

      Value

      • Urgent agent upgrades and configuration changes (bugs, CVEs) can be done in minutes by the monitoring team, without waiting on other teams' automation tools and change cycles.
      • Controlled, staged rollouts of configuration, plugins and agent versions across thousands of agents, with rollback.
      • A dedicated, auditable, role-controlled fleet view and lifecycle management at enterprise scale, which competing platforms already provide for their agents.

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

              Created:
              Updated: