Sha256: b75d177e3d18bf8ad67588ff6b5bd601b0e980c5a120ea922b8eb5f95f5b04d2

Contents?: true

Size: 518 Bytes

Versions: 11

Compression:

Stored size: 518 Bytes

Contents

class Riemann::Babbler::Cuboxtemp < Riemann::Babbler

  def init
    plugin.set_default(:service, 'cuboxtemp')
    plugin.set_default(:interval, 60)
    plugin.set_default(:cmd, "sensors | grep 'T-junction' | awk '{print $2}'")
    plugin.states.set_default(:warning, 90)
    plugin.states.set_default(:critical, 100)
  end

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

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

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
riemann-babbler-1.0.7.2 lib/riemann/babbler/plugins/cuboxtemp.rb
riemann-babbler-1.0.7.1 lib/riemann/babbler/plugins/cuboxtemp.rb
riemann-babbler-1.0.7 lib/riemann/babbler/plugins/cuboxtemp.rb
riemann-babbler-1.0.6 lib/riemann/babbler/plugins/cuboxtemp.rb
riemann-babbler-1.0.5.7 lib/riemann/babbler/plugins/cuboxtemp.rb
riemann-babbler-1.0.5.6 lib/riemann/babbler/plugins/cuboxtemp.rb
riemann-babbler-1.0.5.5 lib/riemann/babbler/plugins/cuboxtemp.rb
riemann-babbler-1.0.5.4 lib/riemann/babbler/plugins/cuboxtemp.rb
riemann-babbler-1.0.5.3 lib/riemann/babbler/plugins/cuboxtemp.rb
riemann-babbler-1.0.5.2 lib/riemann/babbler/plugins/cuboxtemp.rb
riemann-babbler-1.0.5.1 lib/riemann/babbler/plugins/cuboxtemp.rb