Skip to content

Commit

Permalink
Disk plugin: return immediately if usage fails
Browse files Browse the repository at this point in the history
closes #1297
  • Loading branch information
sparrc committed May 31, 2016
1 parent c4cfdb8 commit 8344762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/inputs/system/ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ func (s *systemPS) DiskUsage(
mountpoint := os.Getenv("HOST_MOUNT_PREFIX") + p.Mountpoint
if _, err := os.Stat(mountpoint); err == nil {
du, err := disk.Usage(mountpoint)
du.Path = p.Mountpoint
if err != nil {
return nil, err
}
du.Path = p.Mountpoint
// If the mount point is a member of the exclude set,
// don't gather info on it.
_, ok := fstypeExcludeSet[p.Fstype]
Expand Down

0 comments on commit 8344762

Please sign in to comment.