Werk #19759 · Apr 28, 26
Test agent connection: token-based agent download and registration on remote-site hosts
The "Test agent connection" panel on the Setup → Hosts → Add/Edit host page lets the user generate a one-time token (OTT) that is embedded in the suggested copy&paste commands for downloading and registering the agent.
For hosts that are monitored by a remote site in a distributed setup these
commands failed with 401 Unauthorized:
- The token endpoints (
domain-types/agent_download_token/collections/allanddomain-types/agent_registration_token/collections/all) always run on the central site GUI and write the token into the central site's per-site token store. - The generated curl /
cmk-agent-ctl registercommands point at the remote site (because the host is monitored there). - The token store is per site and intentionally not replicated, so the remote site rejected the token.
Both endpoints now accept an optional site_id field. When set to a remote
site, the central GUI forwards the token creation to that site via the
existing distributed-setup automation channel (site secret), so that the
token is stored on the same site that will redeem it during agent download
or registration.
The host setup slide-in passes the host's monitoring site_id automatically.
Hosts on the central site are unaffected.
Details
- Class:
- Bug Fixes
- Level:
- Trivial
- Component:
- Setup (WATO)
- Versions:
- 3.0.0b1Not yet releasedAll Editions
- 2.5.0p2All Editions