Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion collector/system_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,23 @@ func (s *SystemCollector) Collect(ch chan<- prometheus.Metric) {
} else if simpleStorages == nil {
systemLogContext.WithField("operation", "system.SimpleStorages()").Info("no simple storage data found")
} else {
processed := make(map[string]bool)
for _, simpleStorage := range simpleStorages {
devices := simpleStorage.Devices
wg8.Add(len(devices))
for _, device := range devices {
go parseDevice(ch, systemHostName, device, wg8)
_, exists := processed[device.Name]
if exists {
systemLogContext.WithField("operation",
"system.SimpleStorages()").Info(fmt.Sprintf("Ignoring " +
"duplicate storage device: %s. Please check whether this " +
"device is returning duplicate data and report to the vendor.",
device.Name))
wg8.Done()
continue
}
go parseDevice(ch, systemHostName, device, wg8)
processed[device.Name] = true
}
}
}
Expand Down