Werk #22721 · Nov 30, 26
Agent Controller now handles agent updates
The Agent Controller cmk-agent-ctl now updates the agent on Linux and
Windows. Until now, the agent updater cmk-update-agent did this,
which Checkmk now calls the legacy updater. It needed a
registration and a secret of its own, in addition to the registration of the
Agent Controller.
With the Agent Controller, the TLS registration of a host covers both the monitoring and the agent updates. The host needs no second registration and stores no additional secret. Agent updates remain a feature of the commercial editions.
What the update to Checkmk 3.0 changes
The option Activation of the rule set Agent updater (Linux, Windows, Solaris) now has four entries instead of two. The update converts existing rules:
- Do not deploy automatic agent update plug-in becomes Do not enable agent updates.
- Deploy plug-in that updates agent automatically becomes Enable agent updates with both the Agent Controller and the legacy updater.
You do not have to do anything. With the next agent package that you bake, every host that can use the Agent Controller for updates gets both updaters. The Agent Controller takes over the authorization of the legacy updater by itself, so these hosts do not have to register again. Both updaters then run side by side. They install the same package, so it does not matter which of them updates a host first.
The entries of Activation
- Do not enable agent updates: The agent package contains no updater.
- Enable agent updates with the Agent Controller: The Agent Controller updates Linux and Windows agents. Solaris agents get the legacy updater. Baking fails for Linux hosts without the Agent Controller, and for Linux hosts that the rule set Use classic file deployment keeps on the classic file deployment (see Werk #19234).
- Enable agent updates with both the Agent Controller and the legacy updater: The agent package contains both updaters. Hosts that cannot use the Agent Controller for updates get the legacy updater only, see below.
- Enable agent updates with the legacy updater: Only the legacy updater updates the agents, as in Checkmk 2.5.
AIX packages contain no updater, as before.
The options Update server information, Certificates for HTTPS verification, Proxy settings and Executable format (Linux) are now grouped as Options of the legacy updater. The Agent Controller does not use them. It asks the agent receiver of the site for updates and authenticates with the certificate of its registration. The host therefore has to reach the agent receiver, in pull mode as well. The options Interval for update check, Signature keys the agent will accept and Registration apply to both updaters.
Permission for agent updates
A registration enables agent updates for a host only if the registering user may download the agent of this host. The user needs one of these permissions:
- Enable agent updates on all hosts & download all monitoring agents
- Enable agent updates on hosts & download monitoring agents, and the user has to be a contact of the host
These are the permissions that the registration of the legacy updater requires. For a registration with a one-time token, the user who created the token counts.
Without the permission, the registration still succeeds for the monitoring, but the host gets no agent updates. Every new registration of a host replaces the result of the previous one.
Update source and the Registration option
An Agent Controller can be registered with several sites, but it gets its updates from one of them, the update source. The option Registration of the rule set decides which registration sets the update source:
- On first Agent Controller registration: the first registration that enables agent updates. This is the default.
- On every Agent Controller registration: every registration that enables agent updates.
- Manual: only a registration with the option
--automatic-updates.
With the default, a host that you move to another site keeps its old update
source. Register such a host with cmk-agent-ctl register and the option
--automatic-updates, or delete the old connection before you register.
Commands and monitoring
The daemon of the Agent Controller checks for updates in the configured interval. In addition:
cmk-agent-ctl updatechecks for a new agent package immediately and installs it.cmk-agent-ctl update --check-onlyonly reports which package the site has for the host.cmk-agent-ctl statusshows the update source, the installed agent, the last check, the last update, a pending installation, the signature keys and the last error.
If update cannot ask a site, it names the reason, for example a site of the
Community edition, which offers no agent updates.
The service Check_MK Agent reports the state of the agent updates as before. No new service appears. On a host with both updaters, the service shows the state of the legacy updater until the Agent Controller has completed its first update check, and the state of the Agent Controller afterwards.
For troubleshooting, see the log file of the Agent Controller (Werk #22171).
How a package is installed
On Linux, the Agent Controller runs as the agent user and never gains root
privileges. It passes the downloaded package to a separate systemd service
behind the socket cmk-agent-ctl-installer.socket. This service runs as root
for this one package. It verifies the signature of the package against the
signature keys of the rule, which only root can change on the host, and then
installs the package with dpkg or rpm.
On Windows, the Agent Controller verifies the signature and hands the package to the update mechanism of the Windows agent, which the legacy updater uses as well.
In a distributed setup, a host gets its updates through the site it is registered with. A remote site forwards the requests to the central site.
Hosts that keep the legacy updater
The Agent Controller cannot update the following hosts. Under Enable agent updates with both the Agent Controller and the legacy updater, they get the legacy updater only:
- Solaris hosts
- Linux hosts in the classic file deployment. Werk #19234 describes how to switch them to the single-directory deployment.
- Linux hosts without the Agent Controller
One more case needs your attention: a host whose legacy updater is registered under a different host name than the one in the monitoring, for example the FQDN instead of the short name. The Agent Controller cannot take over the authorization of such a host, and the legacy updater keeps updating it. To use the Agent Controller there, register the Agent Controller of this host again, with a user that has one of the permissions above.
Switching to the Agent Controller only
On a host with both updaters, the details of the service Check_MK Agent say when the Agent Controller has completed the setup of agent updates. To remove the legacy updater from your Linux and Windows hosts, set Activation to Enable agent updates with the Agent Controller and bake the agents. The next agent package removes the legacy updater.
Setup > Maintenance > Analyze configuration has a new item Agent updater in the section Deprecations. It names the entries of your rules that still deploy the legacy updater. Its help text shows how many hosts use the Agent Controller, the legacy updater or both. If product usage analytics is enabled, the site sends these host counts as well.
The legacy updater remains available in Checkmk 3.0. It will be deprecated in an upcoming Checkmk version, so we recommend switching before it is removed.
Details
- Class:
- New Features
- Level:
- Prominent
- Component:
- Agents
- Versions:
- 3.0.0b1Not yet releasedProUltimateUltimate + MTCloud