Sha256: a14f50264ca5a5d14f2265ad4f3e81c14070aed9af939f93fbab2b7e349184ce

Contents?: true

Size: 380 Bytes

Versions: 26

Compression:

Stored size: 380 Bytes

Contents

class Riemann::Babbler::La
  include Riemann::Babbler

  def plugin
    options.plugins.la
  end

  def la 
    File.read('/proc/loadavg').split(/\s+/)[2].to_f
  end

  def tick
    current_state = la
    status = {
      :service => plugin.service,
      :state => state(current_state),
      :metric => current_state
    }
    report status
  end

end

Riemann::Babbler::La.run

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
riemann-babbler-0.2.8 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.2.7 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.2.6 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.2.5 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.2.4 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.2.3 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.2.2 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.2.1 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.2.0 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.1.9 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.1.8 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.1.7 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.1.6 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.1.5 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.1.4 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.1.3 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.1.2 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.1.1 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.1.0 lib/riemann/babbler/plugins/la.rb
riemann-babbler-0.0.9 lib/riemann/babbler/plugins/la.rb