Class: HealthController

Inherits:
ActionController::Base
  • Object
show all
Includes:
RequiresAllowlistedMonitoringClient
Defined in:
app/controllers/health_controller.rb

Overview

rubocop:disable Rails/ApplicationController

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

Instance Method Details

#livenessObject



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

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

#readinessObject



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

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