Fix a bug where the PDU metrics captured by the unifi collector wouldn’t be included in the device output.

This commit is contained in:
Mike Piatek-Jimenez 2023-09-10 13:06:37 -04:00
parent 61d97f2983
commit 6ddb2055d0
1 changed files with 5 additions and 0 deletions

View File

@ -218,6 +218,11 @@ func extractDevices(metrics *Metrics) (*poller.Metrics, map[string]string, map[s
m.Devices = append(m.Devices, r)
}
for _, r := range metrics.Devices.PDUs {
devices[r.Mac] = r.Name
m.Devices = append(m.Devices, r)
}
return m, devices, bssdIDs
}