Skip to content
This repository was archived by the owner on Nov 24, 2021. It is now read-only.

Commit f929957

Browse files
Merge pull request #32 from ovh/disks
fix(disk): consider first disk mountpoint
2 parents 0a85e26 + d8e1ac4 commit f929957

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

cmd/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
)
88

99
var (
10-
version = "2.3.0"
10+
version = "2.3.1"
1111
githash = "HEAD"
1212
)
1313

collectors/disk.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ func (c *Disk) scrape() error {
8181

8282
dev := make(map[string]disk.UsageStat)
8383
for _, p := range parts {
84+
if _, ok := dev[p.Device]; ok {
85+
continue
86+
}
8487
usage, err := disk.Usage(p.Mountpoint)
8588
if err != nil {
8689
continue

0 commit comments

Comments
 (0)