0

我需要将以下流入查询翻译为 promQL

SELECT PERCENTILE(value,95) FROM db WHERE cat = 'time' AND metricName = 'CPU Time' AND time > now() - 1h GROUP BY server
4

1 回答 1

0

尝试以下MetricSQL 查询

histogram_quantile(0.95,
  sum(
    histogram_over_time(
      db_value{cat="time",metric_name="CPU Time",server=~"s1|s2"}[1h]
    )
  ) by (vmrange,server)
)
于 2021-03-08T00:01:16.340 回答