Branch: refs/heads/2.1.0
Home:
https://github.com/tribe29/checkmk
Commit: 96f7ced081a58b06aa1bafe8c611185f82ba93ed
https://github.com/tribe29/checkmk/commit/96f7ced081a58b06aa1bafe8c611185f8…
Author: Simon Meggle <simon.meggle(a)elabit.de>
Date: 2022-10-14 (Fri, 14 Oct 2022)
Changed paths:
A .werks/14562
M cmk/gui/plugins/wato/datasource_programs.py
M cmk/special_agents/utils/prometheus.py
M tests/unit/cmk/special_agents/utils/test_prometheus.py
Log Message:
-----------
14562 FIX Prometheus: allow specifying a path prefix
Previously, the Prometheus special agent would use the path prefix as a
URL base prefix. For example, specifying the use of the host IP
address, e.g. `1.2.3.4`, together with a prefix, e.g., `my_prefix` would
result in an API call to
```
https://my_prefix1.2.3.4/api/v1/status/buildinfo
```
In particular, this behaviour deviated from the description in the
Prometheus rule. With this werk, the path prefix is prepended to the API
calls instead, e.g.,
```
https://1.2.3.4/my_prefix/api/v1/status/buildinfo
```
Users, which have specified a path prefix, are migrated to the new
option `Custom URL base prefix`, which has the same behaviour as the old
path prefix option.
CMK-11288
Change-Id: Id4f5459b6f83661798296f47f42d0780308f2abe