Learn more about the latest product updates at the Checkmk Conference #12 – live from June 16-17! Watch here

Werk #15641: Prometheus: Properly Encode PromQL Queries

Component Checks & agents
Title Prometheus: Properly Encode PromQL Queries
Date Sep 10, 2023
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.3.0b1 Checkmk Community, Checkmk Pro, Checkmk Ultimate, Checkmk Ultimate MT
2.2.0p10 Checkmk Community, Checkmk Pro, Checkmk Ultimate, Checkmk Ultimate MT

The Prometheus agent allows specifying PromQL queries via the option Service creation using PromQL queries. In 2.2.0, any query containing a '+' would not be encoded properly. For example, the query

up{container=".+"}

would result in a HTTP request, which is interpreted by Prometheus as

up{container=". "}

To the list of all Werks