From 3637f10f80506b61900c6bfcdb390e76f7ebb617 Mon Sep 17 00:00:00 2001 From: 5000user5000 Date: Sat, 30 May 2026 18:26:46 +0800 Subject: [PATCH] fix: show zero for empty Grafana 5xx metrics --- .../grafana/dashboards/cloud-native-overview.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/production-like/grafana/dashboards/cloud-native-overview.json b/deploy/production-like/grafana/dashboards/cloud-native-overview.json index 940ffd4..d1c0903 100644 --- a/deploy/production-like/grafana/dashboards/cloud-native-overview.json +++ b/deploy/production-like/grafana/dashboards/cloud-native-overview.json @@ -10,7 +10,7 @@ ], "timezone": "browser", "schemaVersion": 39, - "version": 4, + "version": 5, "refresh": "10s", "time": { "from": "now-15m", @@ -379,7 +379,7 @@ }, "targets": [ { - "expr": "sum(rate(http_server_requests_seconds_count{status=~\"5..\"}[1m]))", + "expr": "sum(rate(http_server_requests_seconds_count{status=~\"5..\"}[1m])) or vector(0)", "refId": "A" } ], @@ -544,7 +544,7 @@ }, "targets": [ { - "expr": "sum(rate(http_server_requests_seconds_count{status=~\"5..\"}[1m]))", + "expr": "sum(rate(http_server_requests_seconds_count{status=~\"5..\"}[1m])) or vector(0)", "legendFormat": "5xx/sec", "refId": "A" }