bin/metrics-disk-capacity.rb in sensu-plugins-disk-checks-2.0.0 vs bin/metrics-disk-capacity.rb in sensu-plugins-disk-checks-2.0.1

- old
+ new

@@ -61,11 +61,11 @@ `df -PT`.split("\n").drop(1).each do |line| begin fs, _type, _blocks, used, avail, capacity, _mnt = line.split timestamp = Time.now.to_i - if fs =~ '/dev' + if fs =~ /\/dev/ fs = fs.gsub('/dev/', '') metrics = { disk: { "#{fs}.used" => used, "#{fs}.avail" => avail, @@ -87,10 +87,10 @@ `df -Pi`.split("\n").drop(1).each do |line| begin fs, _inodes, used, avail, capacity, _mnt = line.split timestamp = Time.now.to_i - if fs =~ '/dev' + if fs =~ /\/dev/ fs = fs.gsub('/dev/', '') metrics = { disk: { "#{fs}.iused" => used, "#{fs}.iavail" => avail,