Class: Check
- Inherits:
-
CloudstackNagios::Base
- Object
- Thor
- CloudstackNagios::Base
- Check
- Defined in:
- lib/cloudstack-nagios/commands/check.rb
Constant Summary
Constants included from CloudstackNagios::Helper
CloudstackNagios::Helper::RETURN_CODES
Instance Attribute Summary
Attributes inherited from CloudstackNagios::Base
Instance Method Summary collapse
Methods inherited from CloudstackNagios::Base
Methods included from CloudstackNagios::Helper
#check_data, #cs_routers, #exit_with_failure, #load_template
Instance Method Details
#storage_pool ⇒ Object
45 46 47 48 49 50 |
# File 'lib/cloudstack-nagios/commands/check.rb', line 45 def storage_pool pool = client.list_storage_pools(name: [:pool_name], zone: [:zone]).first data = check_data(pool['disksizetotal'].to_f, pool['disksizeused'].to_f, [:warning], [:critical]) puts "storage_pool #{[:pool_name]} #{RETURN_CODES[data[0]]} - usage = #{data[1]}% | usage=#{pool['disksizeused']}" exit data[0] end |