No commit activity in last 3 years
No release in over 3 years
Health check for web apps checking things like active record, redis, and AWS.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
~> 10.0
~> 3.0
 Project Readme

ServerHealthCheck

This gem provides a standard set of health checks for web services

Installation

Add this line to your application's Gemfile:

gem 'server_health_check'

And then execute:

$ bundle

Or install it yourself as:

$ gem install server_health_check

Usage

class SomeController
  def show
    health_check = ServerHealthCheck.new
    health_check.active_record!
    health_check.redis!(host: 'optional', port: 1234)
    health_check.aws_creds!
    health_check.aws_s3!('yakmail-inbound')
    health_check.check! do
      # app-specific code that wouldn't belong in the gem
      # return true or false
    end
    http_status = health_check.ok? ? 200 : 500
    render status: http_status, json: {status: health_check.results}
  end
end

Development

Run rake to run tests before committing code