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

Werk #19919: Metric backend: Support for additional consolidation functions in custom queries

Component Telemetry
Title Metric backend: Support for additional consolidation functions in custom queries
Date Aug 5, 2026
Level Prominent Change
Class New Feature
Compatibility Incompatible - Manual interaction might be required
Checkmk versions & editions
3.0.0b1
Not yet released
Checkmk Ultimate, Checkmk Cloud, Checkmk Ultimate MT

The special agent rule Metric backend (custom query) now lets you pick which consolidation function a query runs, and the choice is stored with the rule. All functions known from the graph designer are available:

  • Gauge: last/max/avg/min
  • Sum: rate, delta and the raw value
  • Histogram: quantile, delta and rate of count and sum, fractions of observations below/between thresholds, the cumulative sum, and preserved histograms (merged across a group of series before the quantile or fraction is computed).

Queries can also aggregate across series, mirroring the graph designer's Group by: scalar results can be grouped with avg/count/max/min/sum, and preserved histograms are merged per group. The agent then creates one service per group instead of one per series. A grouped service's name template resolves against the group's key/value pairs. Attribute macros for any other keys are not replaced and stay as literal text in the service name. No metric unit is shown for grouped results, since a group has no single series to take it from.

A grouping can chain further then steps, each aggregating the previous step's groups with avg/count/max/min/sum over a subset of its keys. Grouping by no keys at all (directly or in a then step) combines everything into one series. Such a group has no key/value pairs. $SERIES_ID$ resolves to empty text and attribute macros are not replaced, so use a template that works without them, such as $METRIC_NAME$.

Incompatibility

Previously the agent picked the consolidation from the metric's type (gauge: last value, sum: rate, histogram: quantile). Updating to this version sets every existing query to the gauge function Last recorded value.

Queries on gauge metrics keep working unchanged. Queries on sum or histogram metrics will now encounter no data and need to be migrated manually. The services will enter an UNKNOWN state with Item not found in monitoring data. The affected services can be restored by editing the rule and picking a matching consolidation function for sums or histograms. To restore the old behavior select Rate consolidation for sums and Quantile consolidation for histograms.

To the list of all Werks