From 99ff75136f0c4c1ffcb8283e35a8e2348093fd8b Mon Sep 17 00:00:00 2001 From: Gerrit91 Date: Wed, 11 Oct 2023 10:59:54 +0200 Subject: [PATCH] Forgot to set allocation role. --- metalCollector.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/metalCollector.go b/metalCollector.go index 9b46ad2..1f98cc4 100644 --- a/metalCollector.go +++ b/metalCollector.go @@ -311,6 +311,10 @@ func (collector *metalCollector) Collect(ch chan<- prometheus.Metric) { ) if m.Allocation != nil { + if m.Allocation.Role != nil { + role = *m.Allocation.Role + } + if m.Allocation.Hostname != nil { hostname = *m.Allocation.Hostname }