lib/riemann/babbler/plugins/disk.rb in riemann-babbler-0.0.8 vs lib/riemann/babbler/plugins/disk.rb in riemann-babbler-0.0.9
- old
+ new
@@ -10,10 +10,11 @@
`df -P`.split(/\n/).each do |r|
f = r.split(/\s+/)
next unless f[0] =~ /^\//
next if f[0] == 'Filesystem'
x = f[4].to_f/100
- disk.merge!({f[5] => x})
+ point = (f[5] == '/' ? "/root" : f[5] )
+ disk.merge!({point => x})
end
disk
end
def tick