lib/riemann/babbler/plugins/la.rb in riemann-babbler-1.1.0pre2 vs lib/riemann/babbler/plugins/la.rb in riemann-babbler-1.1.6
- old
+ new
@@ -1,9 +1,9 @@
#encoding: utf-8
class Riemann::Babbler::La < Riemann::Babbler
def collect
- { :service => plugin.service + ' la_1', :description => 'LA averaged over 1 minute', :metric => File.read('/proc/loadavg').split(/\s+/)[2].to_f }
+ { :service => plugin.service + ' la_1', :description => 'LA averaged over 1 minute', :metric => File.read('/proc/loadavg').scan(/[\d\.]+/).first.to_f }
end
end