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