From 43113445b8103e03aee296592a3a2a673ac7781c Mon Sep 17 00:00:00 2001 From: Karsten van Baal Date: Thu, 29 Aug 2024 10:42:46 +0200 Subject: [PATCH] fix: get all running servers and not just first page (#247) --- pkg/exporter/server_metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/exporter/server_metrics.go b/pkg/exporter/server_metrics.go index fe414dd..6fca8ff 100644 --- a/pkg/exporter/server_metrics.go +++ b/pkg/exporter/server_metrics.go @@ -147,7 +147,7 @@ func (c *ServerMetricsCollector) Collect(ch chan<- prometheus.Metric) { defer cancel() now := time.Now() - servers, _, err := c.client.Server.List(ctx, hcloud.ServerListOpts{ + servers, err := c.client.Server.AllWithOpts(ctx, hcloud.ServerListOpts{ Status: []hcloud.ServerStatus{ hcloud.ServerStatusRunning, },