Grafana直方图显示错误的值(数据源:Prometheus)

时间:2017-06-22 13:02:37

标签: histogram monitor metrics grafana prometheus

我正在使用Grafana 4.3.2和Prometheus 2.0作为数据源。 我正试图在Grafana上显示Prometheus直方图。我从Prometheus检索的值如下:

http_request_duration_seconds_bucket{<other_labels>, le="+Inf"}     146
http_request_duration_seconds_bucket{<other_labels>, le="0.005"}    33
http_request_duration_seconds_bucket{<other_labels>, le="0.01"}     61
http_request_duration_seconds_bucket{<other_labels>, le="0.025"}    90
http_request_duration_seconds_bucket{<other_labels>, le="0.05"}     98
http_request_duration_seconds_bucket{<other_labels>, le="0.1"}      108
http_request_duration_seconds_bucket{<other_labels>, le="0.25"}     131
http_request_duration_seconds_bucket{<other_labels>, le="0.5"}      141
http_request_duration_seconds_bucket{<other_labels>, le="1"}        146
http_request_duration_seconds_bucket{<other_labels>, le="10"}       146
http_request_duration_seconds_bucket{<other_labels>, le="2.5"}      146
http_request_duration_seconds_bucket{<other_labels>, le="5"}        146

所以我期望看到的是12个桶,其值在右侧指定。但是,Grafana显示完全不同的值,如下所示:

enter image description here

我有什么遗漏,或Grafana根本不支持Prometheus直方图(丢弃“le”标签)?

1 个答案:

答案 0 :(得分:1)

您需要将图例格式设置为“ {{le}}”