我使用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
Run Code Online (Sandbox Code Playgroud)
所以我期望看到的是12个桶,其值在右侧指定.但是,Grafana显示完全不同的值,如下所示:
有什么我想念的,或者Grafana根本不支持Prometheus直方图(丢弃"le"标签)?
我一直在尝试在Prometheus设置中实现联盟。在执行此操作时,我想排除一些由我的刮板Prometheus刮除的指标。
这是我的联盟配置:
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'xxxxxxxx'
scrape_interval: 15s
honor_labels: true
metrics_path: '/federate'
params:
'match[]':
- '{job!="kubernetes-nodes"}'
static_configs:
- targets:
- 'my-metrics-source'
Run Code Online (Sandbox Code Playgroud)
从配置中可以看出,我要排除任何具有kubernetes-nodes job标签的指标,并检索其余指标。但是,当我部署配置时,不会刮掉任何指标。
是Prometheus中的错误,还是我只是误解了比赛参数的工作方式?
谢谢!