lib/sensu/server/process.rb
def create_registration_check(client)
        check = {:handler => "registration", :status => 1}
        if client.has_key?(:registration)
          check = deep_merge(check, client[:registration])
        end
        timestamp = Time.now.to_i
        overrides = {
          :name => "registration",
          :output => "new client registration",
          :issued => timestamp,
          :executed => timestamp
        }
        check.merge(overrides)
      end
# Create a registration check definition for a client. Client
# definitions may contain `:registration` configuration,
# containing custom attributes and handler information. By
# default, the registration check definition sets the `:handler`
# to `registration`. If the client provides its own
# `:registration` configuration, it's deep merged with the
# defaults. The check `:name`, `:output`, `:issued`, and
# `:executed` values are always overridden to guard against an
# invalid definition.
Create a registration check definition for a client. Client
definitions may contain `:registration` configuration,
containing custom attributes and handler information. By
default, the registration check definition sets the `:handler`
to `registration`. If the client provides its own
`:registration` configuration, it's deep merged with the
defaults.
Create a registration check definition for a client . Client definitions may contain ` : registration ` configuration containing custom attributes and handler information . By default the registration check definition sets the ` : handler ` to ` registration ` . If the client provides its own ` : registration ` configuration it ' s deep merged with the defaults .
def create_registration_check(client)
        check = {:handler => "registration", :status => 1}
        if client.has_key?(:registration)
          check = deep_merge(check, client[:registration])
        end
        timestamp = Time.now.to_i
        overrides = {
          :name => "registration",
          :output => "new client registration",
          :issued => timestamp,
          :executed => timestamp
        }
        check.merge(overrides)
      end
def create_registration_check ( client ) check = { :handler => "registration" , :status => 1 } if client . has_key? ( :registration ) check = deep_merge ( check , client [ :registration ] ) end timestamp = Time . now . to_i overrides = { :name => "registration" , :output => "new client registration" , :issued => timestamp , :executed => timestamp } check . merge ( overrides ) end
Create a registration check definition for a client.
Create a registration check definition for a client .
client