Project

ring

0.0
Low commit activity in last 3 years
No release in over a year
A simple rails engine to provide a health check endpoint.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 5, < 8
 Project Readme

Ring

Rails + Ping = Ring

This is a simple Rails engine that provides a health check endpoint you can use for load balancer health check, external health checks, or anything else.

Installation

Add this line to your application's Gemfile:

gem 'ring'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ring

Usage

By default this will return a status :ok, but you can configure it to exercise other services you might have to include those in the health. For example, it might be good to run User.first to ensure your database connection is healthy. You can do that by creating an initializer with content similar to:

Ring.configure do |config|
  config.add_check :database, -> { User.first }
end

This will now include the health of the database in the status code and the output of the endpoint.

License

The gem is available as open source under the terms of the MIT License.