IE Status Controller Gem
Gem for adding a consistent entrypoint for application uptime monitoring.
Features
Exercises the full application stack, including the database read/write.
-
Renders
iedb$ok
with a status code of 200 if everything is OK. -
Renders
iedb?error
with a status code of 503 if anything goes wrong.
Supported Versions
Known to work, other versions may work as well.
-
Rails > 4.2 (Use version 2.1 of this gem for support for versions: 3.2, 4.0, 4.1)
Installation
Gemfile
Ensure this line is at the top of your Gemfile:
source 'https://gems.iexposure.com'
Then, put this line in your Gemfile:
gem 'ie_status_controller'
Run bundle:
% bundle
Finally, run migrations for your application:
bundle exec rake db:migrate
Routes
In config/routes.rb, add:
mount IeStatusController::Engine => '/status'
Note: Rails routes are processed from the top down. This route is frequently requested by automated processes, and should be placed toward the top of your routes for maximum application performance.
Usage
Hit your application at /status/alive
to check the status.