Sha256: 9640e9dea6c0e0ed4b48b344c43874139244d7cb2752c3ed4f735249726484a9
Contents?: true
Size: 555 Bytes
Versions: 1
Compression:
Stored size: 555 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 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
riemann-babbler-0.0.5 | lib/riemann/babbler/plugins/disk.rb |