Sha256: 6f974c9ab171135b30293c4b5c113806d4167b519900222c4cf9e9de6f8af34c

Contents?: true

Size: 524 Bytes

Versions: 51

Compression:

Stored size: 524 Bytes

Contents

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

  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

51 entries across 51 versions & 1 rubygems

Version Path
riemann-babbler-2.8.5 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.8.4 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.8.3 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.8.2 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.8.1 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.8.0 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.6.0 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.5.9 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.5.8 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.5.7 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.5.6 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.5.5 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.5.4 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.5.3 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.5.2 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.5.1 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.5.0 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.1.5 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.1.4 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-2.1.3.2 lib/riemann/babbler/plugins/mega_cli.rb