From a9c376db1df777daebc6849253eb27494d1e5b67 Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen <101785056+lauri-paypay@users.noreply.github.com> Date: Tue, 16 Jan 2024 18:00:00 +0200 Subject: [PATCH] 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" --- .../datasource/prometheus/dashboards/grafana_stats.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/app/plugins/datasource/prometheus/dashboards/grafana_stats.json b/public/app/plugins/datasource/prometheus/dashboards/grafana_stats.json index b39453b231a..a121de7fe5a 100644 --- a/public/app/plugins/datasource/prometheus/dashboards/grafana_stats.json +++ b/public/app/plugins/datasource/prometheus/dashboards/grafana_stats.json @@ -543,10 +543,10 @@ "pluginVersion": "8.1.0-pre", "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", "intervalFactor": 3, - "legendFormat": "{{statuscode}}", + "legendFormat": "{{status_code}}", "refId": "B", "step": 15, "target": "dev.grafana.cb-office.alerting.active_alerts" @@ -735,7 +735,7 @@ ], "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", "instant": true, "intervalFactor": 10, @@ -1183,5 +1183,5 @@ "timezone": "", "title": "Grafana metrics", "uid": "isFoa0z7k", - "version": 2 + "version": 3 }