bin/riemann-health in riemann-tools-0.2.1 vs bin/riemann-health in riemann-tools-0.2.2

- old
+ new

@@ -235,11 +235,13 @@ end def disk `df -P`.split(/\n/).each do |r| f = r.split(/\s+/) - next unless f[0] =~ /^\// - next if f[0] == 'Filesystem' + next if f[0] == 'Filesystem' + next unless f[0] =~ /\// # Needs at least one slash in the mount path + + # Calculate capacity x = f[4].to_f/100 if x > @limits[:disk][:critical] alert "disk #{f[5]}", :critical, x, "#{f[4]} used" elsif x > @limits[:disk][:warning]