From ec6e1b5a19e7da6515be04e9e679f22bb08260b7 Mon Sep 17 00:00:00 2001 From: ShuNing Date: Thu, 23 May 2024 10:53:46 +0800 Subject: [PATCH] metrics: fix the duplicate avg metrics (#8210) ref tikv/pd#7897 metrics: fix the duplicate avg metrics Signed-off-by: nolouch Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> Signed-off-by: okJiang <819421878@qq.com> --- metrics/grafana/pd.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metrics/grafana/pd.json b/metrics/grafana/pd.json index a2c3d31a4b0e..69afb93f531c 100644 --- a/metrics/grafana/pd.json +++ b/metrics/grafana/pd.json @@ -11248,7 +11248,7 @@ }, { "exemplar": true, - "expr": "rate(pd_scheduler_handle_region_heartbeat_duration_seconds_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", store=~\"$store\"}[1m]) / rate(pd_scheduler_handle_region_heartbeat_duration_seconds_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", store=~\"$store\"}[1m])", + "expr": "sum(rate(pd_scheduler_handle_region_heartbeat_duration_seconds_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", store=~\"$store\"}[1m])) / sum(rate(pd_scheduler_handle_region_heartbeat_duration_seconds_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", store=~\"$store\"}[1m]))", "hide": false, "interval": "", "legendFormat": "avg",