lib/riemann/babbler/plugins/net.rb in riemann-babbler-0.8.8 vs lib/riemann/babbler/plugins/net.rb in riemann-babbler-0.8.9
- old
+ new
@@ -18,11 +18,11 @@
def collect
f = File.read('/proc/net/dev')
status = Array.new
f.split("\n").each do |line|
- iface = line.split(":")[0].strip
- iface.gsub!(/\./,"_")
+ iface = line.split(':')[0].strip
+ iface.gsub!(/\./, '_')
next unless line =~ /(\w*)\:\s*([\s\d]+)\s*/
WORDS.map do |service|
"#{plugin.service} #{iface} #{service}"
end.zip(
$2.split(/\s+/).map { |str| str.to_i }