lib/sensu/server/process.rb
def create_keepalive_check(client)
        check = {
          :thresholds => {
            :warning => 120,
            :critical => 180
          }
        }
        if @settings.handler_exists?(:keepalive)
          check[:handler] = "keepalive"
        end
        if @settings[:sensu][:keepalives]
          check = deep_merge(check, @settings[:sensu][:keepalives])
        end
        if client.has_key?(:keepalive)
          check = deep_merge(check, client[:keepalive])
        end
        timestamp = Time.now.to_i
        check.merge!(:name => "keepalive", :issued => timestamp, :executed => timestamp)
        object_substitute_tokens(check, client)
      end
# Create a keepalive check definition for a client. Client
# definitions may contain `:keepalive` configuration, containing
# specific thresholds and handler information. The keepalive
# check definition creation begins with default thresholds, and
# sets the `:handler` to `keepalive`, if the handler has a local
# definition. If the client provides its own `:keepalive`
# configuration, it's deep merged with the defaults. The check
# `:name`, `:issued`, and `:executed` values are always
# overridden to guard against an invalid definition.
#
# @return [Array] check definition, unmatched client tokens
Create a keepalive check definition for a client. Client
definitions may contain `:keepalive` configuration, containing
specific thresholds and handler information. The keepalive
check definition creation begins with default thresholds, and
sets the `:handler` to `keepalive`, if the handler has a local
definition. If the client provides its own `:keepalive`
configuration, it's deep merged with the defaults.
Create a keepalive check definition for a client . Client definitions may contain ` : keepalive ` configuration containing specific thresholds and handler information . The keepalive check definition creation begins with default thresholds and sets the ` : handler ` to ` keepalive ` if the handler has a local definition . If the client provides its own ` : keepalive ` configuration it ' s deep merged with the defaults .
def create_keepalive_check(client)
        check = {
          :thresholds => {
            :warning => 120,
            :critical => 180
          }
        }
        if @settings.handler_exists?(:keepalive)
          check[:handler] = "keepalive"
        end
        if @settings[:sensu][:keepalives]
          check = deep_merge(check, @settings[:sensu][:keepalives])
        end
        if client.has_key?(:keepalive)
          check = deep_merge(check, client[:keepalive])
        end
        timestamp = Time.now.to_i
        check.merge!(:name => "keepalive", :issued => timestamp, :executed => timestamp)
        object_substitute_tokens(check, client)
      end
def create_keepalive_check ( client ) check = { :thresholds => { :warning => 120 , :critical => 180 } } if @settings . handler_exists? ( :keepalive ) check [ :handler ] = "keepalive" end if @settings [ :sensu ] [ :keepalives ] check = deep_merge ( check , @settings [ :sensu ] [ :keepalives ] ) end if client . has_key? ( :keepalive ) check = deep_merge ( check , client [ :keepalive ] ) end timestamp = Time . now . to_i check . merge! ( :name => "keepalive" , :issued => timestamp , :executed => timestamp ) object_substitute_tokens ( check , client ) end
Create a keepalive check definition for a client.
Create a keepalive check definition for a client .
check definition, unmatched client tokens
check definition unmatched client tokens
Array
client