lib/sensu/server/process.rb
# Publish a proxy check request for a client. This method
# substitutes client tokens in the check definition prior to
# publish the check request. If there are unmatched client
# tokens, a warning is logged, and a check request is not
# published.
#
# @param client [Hash] definition.
# @param check [Hash] definition.
Publish a proxy check request for a client. This method
substitutes client tokens in the check definition prior to
publish the check request. If there are unmatched client
tokens, a warning is logged, and a check request is not
published.
Publish a proxy check request for a client . This method substitutes client tokens in the check definition prior to publish the check request . If there are unmatched client tokens a warning is logged and a check request is not published .
def publish_proxy_check_request(client, check)
        @logger.debug("creating a proxy check request", {
          :client => client,
          :check => check
        })
        proxy_check, unmatched_tokens = object_substitute_tokens(deep_dup(check.dup), client)
        if unmatched_tokens.empty?
          proxy_check[:source] ||= client[:name]
          publish_check_request(proxy_check)
        else
          @logger.warn("failed to publish a proxy check request", {
            :reason => "unmatched client tokens",
            :unmatched_tokens => unmatched_tokens,
            :client => client,
            :check => check
          })
        end
      end
def publish_proxy_check_request ( client , check ) @logger . debug ( "creating a proxy check request" , { :client => client , :check => check } ) proxy_check , unmatched_tokens = object_substitute_tokens ( deep_dup ( check . dup ) , client ) if unmatched_tokens . empty? proxy_check [ :source ] ||= client [ :name ] publish_check_request ( proxy_check ) else @logger . warn ( "failed to publish a proxy check request" , { :reason => "unmatched client tokens" , :unmatched_tokens => unmatched_tokens , :client => client , :check => check } ) end end
Publish a proxy check request for a client.
Publish a proxy check request for a client .
client
None
check
None