From 781333754827ee840f0a99ee998c08b3ea647745 Mon Sep 17 00:00:00 2001 From: atlas Date: Fri, 30 Oct 2026 17:12:11 +0100 Subject: [PATCH] agents dashboard: count agents reporting over the selected range --- nix/host-modules/swarm-grafana/dashboards/agents.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/host-modules/swarm-grafana/dashboards/agents.json b/nix/host-modules/swarm-grafana/dashboards/agents.json index 0defab47..e4aae4d3 100644 --- a/nix/host-modules/swarm-grafana/dashboards/agents.json +++ b/nix/host-modules/swarm-grafana/dashboards/agents.json @@ -146,7 +146,7 @@ "name": "@datasourceUid@" }, "spec": { - "expr": "count(count by (agent) ({__name__=\"hyperhive.container.cpu.percent\", hive=~\"$hive\", agent=~\"$agent\"}))", + "expr": "count(count by (agent) (last_over_time({__name__=\"hyperhive.container.cpu.percent\", hive=~\"$hive\", agent=~\"$agent\"}[$__range])))", "instant": true, "legendFormat": "agents" }