Class: HealthController

Inherits:
BaseActionController show all
Includes:
RequiresAllowlistedMonitoringClient
Defined in:
app/controllers/health_controller.rb

Constant Summary collapse

CHECKS =
[
  Gitlab::HealthChecks::MasterCheck
].freeze
ALL_CHECKS =
[
  *CHECKS,
  Gitlab::HealthChecks::DbCheck,
  *Gitlab::HealthChecks::Redis::ALL_INSTANCE_CHECKS,
  Gitlab::HealthChecks::GitalyCheck
].freeze

Instance Method Summary collapse

Methods inherited from BaseActionController

#append_to_content_security_policy

Methods included from ContentSecurityPolicyPatch

#content_security_policy_with_context

Methods included from CurrentOrganization

#set_current_organization

Instance Method Details

#livenessObject



24
25
26
27
# File 'app/controllers/health_controller.rb', line 24

def liveness
  # liveness check is a collection without additional checks
  render_checks
end

#readinessObject



18
19
20
21
22
# File 'app/controllers/health_controller.rb', line 18

def readiness
  # readiness check is a collection of application-level checks
  # and optionally all service checks
  render_checks(params[:all] ? ALL_CHECKS : CHECKS)
end