Class: HealthController

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

Constant Summary collapse

CHECKS =
[
  Gitlab::HealthChecks::MasterCheck
].freeze
ALL_CHECKS =
[
  *CHECKS,
  Gitlab::HealthChecks::DbCheck,
  Gitlab::HealthChecks::Redis::RedisCheck,
  Gitlab::HealthChecks::Redis::CacheCheck,
  Gitlab::HealthChecks::Redis::QueuesCheck,
  Gitlab::HealthChecks::Redis::SharedStateCheck,
  Gitlab::HealthChecks::Redis::TraceChunksCheck,
  Gitlab::HealthChecks::Redis::RateLimitingCheck,
  Gitlab::HealthChecks::Redis::SessionsCheck,
  Gitlab::HealthChecks::GitalyCheck
].freeze

Instance Method Summary collapse

Instance Method Details

#livenessObject


30
31
32
33
# File 'app/controllers/health_controller.rb', line 30

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

#readinessObject


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

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