0.07
No commit activity in last 3 years
No release in over 3 years
Rack::Health is a health check interface for rack applications.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.0.0

Runtime

>= 1.2.0
 Project Readme

Build Status

What's Rack::Health

Rack::Health is a health check interface for rack applications.

Usage

Install

# Gemfile
gem 'rack-health'

Basic

# config.ru
use Rack::Health
$ curl localhost:3000/rack_health
=> 200 OK

Customize url

use Rack::Health, :path => '/healthcheck'
$ curl localhost:3000/healthcheck
=> 200 OK

Customize sick condition

use Rack::Health, :sick_if => lambda { File.exist?('/tmp/service_out') }
$ curl localhost:3000/rack_health
=> 200 OK

$ touch /tmp/service_out

$ curl localhost:3000/rack_health
=> 503 Service Unavailable

License

Rack::Health is released under the MIT license:

Copyright (c) 2012 Issei Naruta