lib/sensu/client/validators/check.rb
# Determine if a check definition is valid.
#
# @param client [Hash]
# @return [TrueClass, FalseClass]
Determine if a check definition is valid.
Determine if a check definition is valid .
def valid?(check)
          must_be_a_string(check[:output]) ||
            invalid(check, "check output must be a string")
          must_be_an_integer(check[:status]) ||
            invalid(check, "check status must be an integer")
          must_be_an_integer(check[:executed]) ||
            invalid(check, "check executed timestamp must be an integer")
          validate_check_name(check)
          validate_check_handling(check)
          validate_check_aggregate(check)
          validate_check_flap_detection(check)
          validate_check_truncate_output(check)
          validate_check_source(check) if check[:source]
          validate_check_ttl(check) if check[:ttl]
          @failures.empty?
        end
def valid? ( check ) must_be_a_string ( check [ :output ] ) || invalid ( check , "check output must be a string" ) must_be_an_integer ( check [ :status ] ) || invalid ( check , "check status must be an integer" ) must_be_an_integer ( check [ :executed ] ) || invalid ( check , "check executed timestamp must be an integer" ) validate_check_name ( check ) validate_check_handling ( check ) validate_check_aggregate ( check ) validate_check_flap_detection ( check ) validate_check_truncate_output ( check ) validate_check_source ( check ) if check [ :source ] validate_check_ttl ( check ) if check [ :ttl ] @failures . empty? end
Determine if a check definition is valid.
Determine if a check definition is valid .
None
TrueClass, FalseClass
check
None