lib/riemann/babbler/plugins/disk.rb in riemann-babbler-0.8.4 vs lib/riemann/babbler/plugins/disk.rb in riemann-babbler-0.8.5

- old
+ new

@@ -26,13 +26,13 @@ disk = Array.new monit_points.each do |point| point_stat = Filesystem.stat point human_point = point == "/" ? "/root" : point human_point.gsub!(/^\//, "").gsub!(/\//, "_") - disk << { :service => plugin.service + " #{human_point} % block", :description => "Процент утилизации: #{point_stat}", :metric => (1- point_stat.blocks_available.to_f/point_stat.blocks).round(2) * 100 } - disk << { :service => plugin.service + " #{human_point} % inode", :description => "Процент утилизации inode: #{point_stat}", :metric => (1 - point_stat.files_available.to_f/point_stat.files).round(2) * 100 } - disk << { :service => plugin.service + " #{human_point} abs free", :description => "Всего диск (b): #{point_stat}", :metric => point_stat.blocks_free * point_stat.block_size, :state => 'ok'} - disk << { :service => plugin.service + " #{human_point} abs total", :description => "Утилизация диск (b): #{point_stat}", :metric => point_stat.blocks * point_stat.block_size, :state => 'ok'} + disk << { :service => plugin.service + " #{human_point} % block", :description => "Disk usage #{point_stat}, %", :metric => (1- point_stat.blocks_available.to_f/point_stat.blocks).round(2) * 100 } + disk << { :service => plugin.service + " #{human_point} % inode", :description => "Disk usage #{point_stat}, inodes %", :metric => (1 - point_stat.files_available.to_f/point_stat.files).round(2) * 100 } + disk << { :service => plugin.service + " #{human_point} abs free", :description => "Disk free #{point_stat}, B", :metric => point_stat.blocks_free * point_stat.block_size, :state => 'ok'} + disk << { :service => plugin.service + " #{human_point} abs total", :description => "Disk space #{point_stat}, B", :metric => point_stat.blocks * point_stat.block_size, :state => 'ok'} end disk end end