This gem creates a traffic check endpoint in your rails app at GET /traffic_check via json. This endpoint will normally return a 200 status code, along with a json string with lite details. Similarly, it returns different statuses and json for different modes, the modes are:
Mode | Code | Trigger File |
---|---|---|
Up | 200 | None (Default mode) |
Maintenance | 404 | app.maintenance |
Down | 500 | app.down |
The traffic modes above are triggered by the presence of the trigger files listed in the table.
Add this line to your application's Gemfile:
gem 'traffic_check', :git => "git@github.com:ben-grid/traffic_check.git"
And then execute:
$ bundle install
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request