以下查询对我们有用:
sum(http_request_duration_microseconds{role="api",service="awesome-api",environment="prod"}) by (quantile)
但现在抱怨如下:
Error executing query: parse error at char 98: unexpected <aggr:quantile> in grouping opts, expected identifier
在不包含sum(...) by (quantile)
的情况下运行查询的每个指标都包含分位数。
有关我们正在运行的prometheus的信息:
Version 1.1.1
Revision 24db241bd556fd45854dd310692ac291de7d24e1
Branch master
BuildUser root@90d3f69e2d67
BuildDate 20160907-09:42:10
GoVersion go1.6.3
这是一些过时的PromQL还是我们遗漏了什么?
感谢。
答案 0 :(得分:2)
首先,因此查询在数学上无效 - 您无法添加分位数。如果要聚合使用直方图和histogram_quantile。
其次这是最近的回归。我们即将推出修复方案。见https://github.com/prometheus/prometheus/pull/1958