Sha256: cd45bbabd6a15740c7374e451e91e6beae085bcd2fdcb9e3a0a178251cb0449c

Contents?: true

Size: 539 Bytes

Versions: 29

Compression:

Stored size: 539 Bytes

Contents

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

  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

29 entries across 29 versions & 1 rubygems

Version Path
riemann-babbler-2.1.2 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.1.1 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.1.0 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.9 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.8 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.7 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.6.1 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.6 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.5 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.4 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.3.2 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.3.1 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.3 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.2 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.1 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.0 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.0pre15 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.0pre13 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.0pre11 lib/riemann/babbler/plugins/cpu_fan.rb
riemann-babbler-2.0.0pre10 lib/riemann/babbler/plugins/cpu_fan.rb