1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/controllers/health_controller.rb

19 lines
458 B
Ruby

# frozen_string_literal: true
# Controller for the application status, useful for debugging
class HealthController < ActionController::Base
respond_to :json
def status
render json: {
name: 'Fab-Manager',
status: 'running',
dependencies: {
postgresql: HealthService.database?,
redis: HealthService.redis?,
elasticsearch: HealthService.elasticsearch?
},
stats: HealthService.stats
}
end
end