Sha256: 3ff922177e08d67af1957c2680d8d6dcd15ca5c6346352f95a3793e93edc1e13
Contents?: true
Size: 562 Bytes
Versions: 2
Compression:
Stored size: 562 Bytes
Contents
class Riemann::Babbler::Disk include Riemann::Babbler def plugin options.plugins.disk end def disk disk = {} `df -P`.split(/\n/).each do |r| f = r.split(/\s+/) next unless f[0] =~ /^\// next if f[0] == 'Filesystem' x = f[4].to_f/100 disk.merge!({f[5] => x}) end return disk end def tick disk.each do |point, free| report({ :service => plugin.service + " on #{point}", :state => state(free), :metric => free }) end end end Riemann::Babbler::Disk.run
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
riemann-babbler-0.0.4 | lib/riemann/babbler/plugins/disk.rb |
riemann-babbler-0.0.3 | lib/riemann/babbler/plugins/disk.rb |