Sha256: ea91791508c559c6b462ce7516cb2e17d67e0b8a3010de93ab3f9e3c35671ef8

Contents?: true

Size: 507 Bytes

Versions: 36

Compression:

Stored size: 507 Bytes

Contents

class Riemann::Babbler::MegaCli < Riemann::Babbler

  def init
    plugin.set_default(:service, 'megacli')
    plugin.set_default(:cmd, 'megacli -AdpAllInfo -aAll -NoLog | awk -F": " \'/Virtual Drives/ { getline; print $2; }\'')
    plugin.set_default(:interval, 60)
    plugin.states.set_default(:critical, 1)
  end

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

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

end

Version data entries

36 entries across 36 versions & 1 rubygems

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