Werk #18354: OTel: Fix: Hostnames and IPv4 addresses no longer wrapped in brackets in OTEL collector config

Component Checks & agents
Title OTel: Fix: Hostnames and IPv4 addresses no longer wrapped in brackets in OTEL collector config
Date Aug 12, 2025
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.5.0b1
Not yet released
Checkmk MSP (CME)
2.4.0p11 Checkmk MSP (CME)

Previously, the OTEL collector configuration generation wrapped all non-IPv4 addresses in square brackets, which caused hostnames and IPv4 addresses to be rendered in an invalid Prometheus target format (e.g. [example.com]:443).

This prevented successful scraping by the Prometheus receiver.

The generation logic has been corrected:

  • IPv6 addresses are still enclosed in brackets (required syntax).
  • Hostnames and IPv4 addresses are now output without brackets.

As a result, Prometheus targets in generated configs should now scrape correctly.

User action required

If you have an existing configuration, open the configuration in the GUI, click Save, and then Activate the changes to apply this fix. This will regenerate the OTEL collector configuration with the corrected target format.

To the list of all Werks