Skip to content

Commit b5d9151

Browse files
authored
Merge pull request #4 from beclab/fix/filter-qemu-disk
fix: filter qemu style disk
2 parents 49a25eb + 4324fba commit b5d9151

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

collector/diskstats_linux.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,9 @@ func (c *diskstatsCollector) scan() (map[string]*smartctlDeviceJSON, error) {
547547
if err != nil {
548548
return nil, fmt.Errorf("smarctl scan device: %s, error: %w", device.Name, err)
549549
}
550+
if strings.Contains(strings.ToUpper(res.SCSIVendor), "QEMU") {
551+
continue
552+
}
550553
result[device.Name] = res
551554
}
552555
return result, nil

0 commit comments

Comments
 (0)