Add the following line to your Gemfile
gem "server_health_check-rails"
Copy health_check.rb
in config/initializers/health_check.rb
HEALTHCHECK_SECRET_KEY
env var allow you to add a token in url.
You could update or create new checks. The example do the following checks:
active_record
: Check ActiveRecordredis
: Check redis connectionsidekiq
: Check sidekiq redis respond toPING
cache
: CheckRails.cache
write and readdatabase
: Check database respondmigrations
: Check migrations are up to dateactivestorage
: Check ActiveStorage upload and download worksexternal_services
: Here you can check external status (ex: check status page of shopify)email
: Check email configuration (smtp only)
{
"status": {
"heartbeat": "OK",
"active_record": "OK",
"redis": "OK",
"sidekiq": "OK",
"cache": "OK",
"database": "OK",
"migrations": "OK",
"activestorage": "OK",
"external_services": "OK",
"email": "OK"
}
}