Sha256: 8d25a53b8922ceb113e1d27cc7194e4974da651064d346ee39e781ed94511040

Contents?: true

Size: 522 Bytes

Versions: 39

Compression:

Stored size: 522 Bytes

Contents

class Riemann::Babbler::CpuFan < Riemann::Babbler

  def init
    plugin.set_default(:service, 'cpufan')
    plugin.set_default(:cmd, '/usr/bin/sensors | grep "CPU FAN Speed:" | awk "{print $4}"')
    plugin.set_default(:interval, 60)
    plugin.states.set_default(:warning, 2000)
    plugin.states.set_default(:critical, 3000)
  end

  def run_plugin
    File.exists? '/usr/bin/sensors'
  end

  def collect
    { :service => plugin.service, :metric => shell(plugin.cmd).to_i, :description => 'CPU Fan Speed'}
  end

end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
riemann-babbler-1.4.0 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.9.7 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.9.6 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.9.5 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.9.4 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.9.3 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.9.1 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.9 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.8 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.7 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.6 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.5 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.4 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.3 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.2 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.1 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.3.0 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.2.9 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.2.8 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-1.2.7 lib/riemann/babbler/plugins/cpu_fan.rb