How to reduce array of numbers into single value?

I have grafana alerts configured.
Math, Reduce expressions on Prometheus source.
Reduce expression returns array of numbers, every number corresponds to metric with label applications, which is application name.

How can i pick only Min single number(from the array of numbers from Reduce expression mean weight) and issue alert if this value below the threshold ?

hello
add one more reduce
Type: Reduce
Input: mean_weight (previous reduce)
Function: Min
Mode: Drop Non-numeric Values

Doesnt work

It outputs the array of numbers, not the single min one

find min in promtql or try instance option

Hi @voipp,

Alerting expressions in Grafana are designed to operate on individual time series, not across multiple series (for example, you can’t directly “take the minimum across all series” at the expression level).

This ties into how multi-dimensional alerts work:

  • A single alert rule can produce multiple alert instances
  • Each unique label set returned by your query becomes a time series and its own alert instance

Regarding expressions:

  • The Reduce expression operates on a single time series and collapses it into a single value (for example, last/avg/min over time)
  • It does not combine multiple series into one
  • From your screenshot, it looks like rate_weighted may already be filtering/dropping some series during the Math step, and then Reduce is applied per remaining series

See also how Grafana expressions work.

If your goal is to alert on the minimum across all series, try to move that logic into your PromQL query, for example:

min(your_metric_here)

(or `min by (...)` depending on how you want to group)

Then use Grafana expressions only for defining the threshold condition or simple transformations.