Sha256: feb4890e2d82bf15bdd310afb95f25e1d2fe71119250502d1a43af192cd0f59a
Contents?: true
Size: 597 Bytes
Versions: 30
Compression:
Stored size: 597 Bytes
Contents
class Riemann::Babbler::TwCli < Riemann::Babbler def init plugin.set_default(:service, 'twcli') plugin.set_default(:cmd, "/usr/sbin/tw_cli show | awk '/^c/{print $1}' | xargs -rI{} /usr/sbin/tw_cli /{} show | awk '/^[upb]/&&!/[ \t](OK|VERIFYING|VERIFY-PAUSED)/' |wc -l") plugin.states.set_default(:critical, 1) plugin.set_default(:interval, 300) end def run_plugin File.exists? '/usr/sbin/tw_cli' end def collect { :service => plugin.service, :metric => shell(plugin.cmd).to_i, :description => 'Hardware raid tw_cli status' } end end
Version data entries
30 entries across 30 versions & 1 rubygems