lib/riemann/babbler/plugins/net.rb in riemann-babbler-0.1.6 vs lib/riemann/babbler/plugins/net.rb in riemann-babbler-0.1.7
- old
+ new
@@ -29,9 +29,10 @@
f = File.read('/proc/net/dev')
status = Hash.new
@diff = Hash.new
f.split("\n").each do |line|
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 }