class Nagios::Promoo::Appdb::Probes::SizesProbe
Probe for checking flavors/sizes in AppDB.
@author Boris Parak <parak@cesnet.cz>
Public Class Methods
declaration()
click to toggle source
# File lib/nagios/promoo/appdb/probes/sizes_probe.rb, line 21 def declaration 'sizes' end
description()
click to toggle source
# File lib/nagios/promoo/appdb/probes/sizes_probe.rb, line 13 def description ['sizes', 'Run a probe checking size/flavor/resource templates in AppDB'] end
options()
click to toggle source
# File lib/nagios/promoo/appdb/probes/sizes_probe.rb, line 17 def options [] end
runnable?()
click to toggle source
# File lib/nagios/promoo/appdb/probes/sizes_probe.rb, line 25 def runnable? true end
Public Instance Methods
run(_args = [])
click to toggle source
# File lib/nagios/promoo/appdb/probes/sizes_probe.rb, line 30 def run(_args = []) count = Timeout.timeout(options[:timeout]) { sizes_by_endpoint.count } if count < 1 puts 'SIZES CRITICAL - No size/flavor/resource templates found in AppDB' exit 2 end puts "SIZES OK - Found #{count} size/flavor/resource templates in AppDB" rescue => ex puts "SIZES UNKNOWN - #{ex.message}" puts ex.backtrace if options[:debug] exit 3 end