Skip to content

mirakui/rack-health

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages