Sha256: 47cad447b5d0b882be77b90f02095c6ee7ae4531093b0bb78b1c82643d19c361

Contents?: true

Size: 506 Bytes

Versions: 39

Compression:

Stored size: 506 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

39 entries across 39 versions & 1 rubygems

Version Path
riemann-babbler-1.4.0 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.9.7 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.9.6 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.9.5 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.9.4 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.9.3 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.9.1 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.9 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.8 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.7 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.6 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.5 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.4 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.3 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.2 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.1 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.3.0 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.2.9 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.2.8 lib/riemann/babbler/plugins/mega_cli.rb
riemann-babbler-1.2.7 lib/riemann/babbler/plugins/mega_cli.rb