grafana metrics dashboard: use correct grafana http request metrics (#80338)

grafana's metrics exporter does not provide a metric called
"http_request_total"; fix the dashboard to use the actually existing
"grafana_http_request_duration_seconds_count"
This commit is contained in:
Lauri Tirkkonen 2024-01-16 18:00:00 +02:00 committed by GitHub
parent f9dcc9ff90
commit a9c376db1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -543,10 +543,10 @@
"pluginVersion": "8.1.0-pre", "pluginVersion": "8.1.0-pre",
"targets": [ "targets": [
{ {
"expr": "sum by (statuscode) (irate(http_request_total{job='grafana'}[5m]))", "expr": "sum by (status_code) (irate(grafana_http_request_duration_seconds_count[5m]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 3, "intervalFactor": 3,
"legendFormat": "{{statuscode}}", "legendFormat": "{{status_code}}",
"refId": "B", "refId": "B",
"step": 15, "step": 15,
"target": "dev.grafana.cb-office.alerting.active_alerts" "target": "dev.grafana.cb-office.alerting.active_alerts"
@ -735,7 +735,7 @@
], ],
"targets": [ "targets": [
{ {
"expr": "sort(topk(8, sum by (handler) (http_request_total{job=\"grafana\"})))", "expr": "sort(topk(8, sum by (handler) (grafana_http_request_duration_seconds_count)))",
"format": "time_series", "format": "time_series",
"instant": true, "instant": true,
"intervalFactor": 10, "intervalFactor": 10,
@ -1183,5 +1183,5 @@
"timezone": "", "timezone": "",
"title": "Grafana metrics", "title": "Grafana metrics",
"uid": "isFoa0z7k", "uid": "isFoa0z7k",
"version": 2 "version": 3
} }