Sha256: 748bbcaf7953b0cb0d56d71ef53e6da6488b244be94dc6d3db83143ad4c9a523

Contents?: true

Size: 538 Bytes

Versions: 42

Compression:

Stored size: 538 Bytes

Contents

class Riemann::Babbler::Cputemp < Riemann::Babbler

  def init
    plugin.set_default(:service, 'cputemp')
    plugin.set_default(:interval, 60)
    plugin.set_default(:cmd, '/usr/bin/sensors | grep "CPU Temperature:" | awk "{print $3}" | cut -c2-3')
    plugin.states.set_default(:warning, 60)
    plugin.states.set_default(:critical, 80)
  end

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

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

end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
riemann-babbler-1.0.7.9 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.7.8 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.7.7 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.7.5 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.7.4 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.1.0pre2 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.7.3 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.7.2 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.7.1 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.7 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.6 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.5.7 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.5.6 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.5.5 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.5.4 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.5.3 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.5.2 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.5.1 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.5 lib/riemann/babbler/plugins/cputemp.rb
riemann-babbler-1.0.4 lib/riemann/babbler/plugins/cputemp.rb