首页/云/可观测性速查/Reduce 转换:序列归约成表
Grafana 与看板53 条

Reduce 转换:序列归约成表

把多条时间序列压缩成每个序列一行:指定统计量(Last non-null/Mean/Max 等)与 Series to rows 模式,是 TopN 表与巡检表的常用起点。

可观测性速查云更新于 2026-10-12

转换配置(JSON 片段)

转换配置(JSON 片段)
{"id": "reduce",
 "options": {"reducers": ["lastNotNull", "mean", "max"],
             "mode": "seriesToRows"}}
典型链路:Reduce → Organize fields 整理列名 → 表格排序,输出可直接巡检的清单。

易错点

  • seriesToRows 会丢掉时间维度,需要保留趋势时不要接这一步
  • 某行统计量为空多见于该序列无数据,先回查询确认再当成计算错误

数据来源与参考

  • Grafana 官方文档 · Reduce transformation
​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌