Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
process available partitions (#1741)
Browse files Browse the repository at this point in the history
Signed-off-by: Dani Louca <[email protected]>
  • Loading branch information
dloucasfx authored Apr 28, 2021
1 parent edfc553 commit 7da007d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/monitors/filesystems/filesystems.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,15 @@ func (m *Monitor) emitDatapoints() {
}

partitions, err := gopsutil.Partitions(all)
if err != nil {
m.logger.WithError(err).Errorf("failed to collect list of mountpoints")
if err != nil && len(partitions) == 0 {
m.logger.WithError(err).Errorf("failed to collect any mountpoints")
return
}

if err != nil {
m.logger.Debugf("failed to collect all mountpoints: %v", err)
}

dps := make([]*datapoint.Datapoint, 0)

var used uint64
Expand Down

0 comments on commit 7da007d

Please sign in to comment.