Skip to content

Commit

Permalink
Fix a bug where the PDU metrics captured by the unifi collector would…
Browse files Browse the repository at this point in the history
…n’t be included in the device output.
  • Loading branch information
mikepj committed Sep 10, 2023
1 parent 61d97f2 commit 6ddb205
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/inputunifi/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 6ddb205

Please sign in to comment.