Catch up on the latest product updates, best practices, and expert insights from the Checkmk Conference #12 – Watch the livestream recordings now

Werk #20185: Prometheus special agent: fix wrong URL for reverse-proxied connections

Component Checks & agents
Title Prometheus special agent: fix wrong URL for reverse-proxied connections
Date Jul 21, 2026
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
3.0.0b1
Not yet released
Checkmk Community, Checkmk Pro, Checkmk Ultimate, Checkmk Cloud, Checkmk Ultimate MT
2.5.0p11 Checkmk Community, Checkmk Pro, Checkmk Ultimate, Checkmk Cloud, Checkmk Ultimate MT
2.4.0p36
Not yet released
Checkmk Community, Checkmk Pro, Checkmk Ultimate, Checkmk Cloud, Checkmk Ultimate MT

Previously, when the Prometheus "URL server address" (connection) included a path suffix, for example when Prometheus runs behind a reverse proxy under a subpath like example.com/prometheus, the special agent queried the wrong URL when looking up the Prometheus build info (used for the Prometheus Build service). The subpath, together with the API's /api/v1/ prefix, was silently dropped from the request URL.

Depending on how the reverse proxy responded to that wrong URL, this could make the special agent fail with an error such as:

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This has been fixed. The special agent now queries these endpoints under the full configured URL, including any reverse-proxy subpath.

Technical background

The bug was caused by a leading slash in the endpoint paths passed to the special agent's internal HTTP client. Combined with Python's urllib.parse.urljoin(), a leading slash resolves the endpoint relative to the domain root instead of the configured base URL, discarding the /api/v1/ prefix and any reverse-proxy subpath.

To the list of all Werks