From 48a7c17448dfd62b16ae3346ca9ce6ec587748e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Sun, 22 Dec 2024 13:43:31 +0100 Subject: [PATCH] Fix labels --- nodes/prometheus.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nodes/prometheus.go b/nodes/prometheus.go index e83fe01..6d1d319 100644 --- a/nodes/prometheus.go +++ b/nodes/prometheus.go @@ -6,8 +6,8 @@ import ( ) type prometheusDiscovery struct { - Labels Labels `json:"Labels"` - Targets []string `json:"Targets"` + Labels map[string]string `json:"Labels"` + Targets []string `json:"Targets"` } func GetPrometheusSD(p *NodesProcessor, ss string) []prometheusDiscovery { @@ -15,7 +15,7 @@ func GetPrometheusSD(p *NodesProcessor, ss string) []prometheusDiscovery { pds := []prometheusDiscovery{ { - Labels: Labels{}, + Labels: make(map[string]string), Targets: []string{}, }, }