diff options
Diffstat (limited to 'app/controllers/health_controller.rb')
-rw-r--r-- | app/controllers/health_controller.rb | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/app/controllers/health_controller.rb b/app/controllers/health_controller.rb index abc832e6ddc..16abf7bab7e 100644 --- a/app/controllers/health_controller.rb +++ b/app/controllers/health_controller.rb @@ -1,11 +1,15 @@ class HealthController < ActionController::Base - protect_from_forgery with: :exception - include RequiresHealthToken + protect_from_forgery with: :exception, except: :storage_check + include RequiresWhitelistedMonitoringClient CHECKS = [ Gitlab::HealthChecks::DbCheck, - Gitlab::HealthChecks::RedisCheck, - Gitlab::HealthChecks::FsShardsCheck + Gitlab::HealthChecks::Redis::RedisCheck, + Gitlab::HealthChecks::Redis::CacheCheck, + Gitlab::HealthChecks::Redis::QueuesCheck, + Gitlab::HealthChecks::Redis::SharedStateCheck, + Gitlab::HealthChecks::FsShardsCheck, + Gitlab::HealthChecks::GitalyCheck ].freeze def readiness @@ -20,6 +24,15 @@ class HealthController < ActionController::Base render_check_results(results) end + def storage_check + results = Gitlab::Git::Storage::Checker.check_all + + render json: { + check_interval: Gitlab::CurrentSettings.current_application_settings.circuitbreaker_check_interval, + results: results + } + end + private def render_check_results(results) |