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{}, }, }