lib/riemann/babbler/plugins/disk.rb in riemann-babbler-0.1.4 vs lib/riemann/babbler/plugins/disk.rb in riemann-babbler-0.1.5

- old
+ new

@@ -7,11 +7,12 @@ NOT_MONITORING_FS = [ 'sysfs', 'nfs', 'devpts', 'squashfs', - 'proc' + 'proc', + 'devtmpfs' ] def plugin options.plugins.disk end @@ -27,9 +28,11 @@ end disk = Hash.new monit_points.each do |point| point_stat = Filesystem.stat point human_point = point == "/" ? "/root" : point + human_point.gsub!(/^\//, "") + human_point.gsub!(/\//, "_") disk.merge!({human_point + " block" => 1 - point_stat.blocks_available.to_f/point_stat.blocks}) disk.merge!({human_point + " inode" => 1 - point_stat.files_available.to_f/point_stat.files}) end disk end