From 2f521a87d48f9898f361d1bf66d0c7308f06066e Mon Sep 17 00:00:00 2001 From: Mark Wolfe Date: Wed, 21 Dec 2016 09:56:02 +1100 Subject: [PATCH] Fix for loop over value array range issue. (#2187) --- plugins/inputs/system/ps.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/inputs/system/ps.go b/plugins/inputs/system/ps.go index a885e2d59c629..b0e021e407b35 100644 --- a/plugins/inputs/system/ps.go +++ b/plugins/inputs/system/ps.go @@ -73,7 +73,10 @@ func (s *systemPS) DiskUsage( var usage []*disk.UsageStat var partitions []*disk.PartitionStat - for _, p := range parts { + for i := range parts { + + p := parts[i] + if len(mountPointFilter) > 0 { // If the mount point is not a member of the filter set, // don't gather info on it.