fabioperrella / heartcheck

A simple way to check if everything is good in your app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Heartcheck

Heartcheck is a monitoring tool for Rack applications. It provides a DSL to declare service checks and an URI that returns the status for each service. With this gem you can monitor if your app has access to the database, a cache service, an API, etc.

Build Status Code Climate Ebert

Installation

Add this line to your application's Gemfile:

gem 'heartcheck'

And then execute:

$ bundle

Or install it yourself as:

$ gem install heartcheck

Usage

First generate the config file for the framework you are using:

$ heartcheck rails
$ heartcheck padrino
$ heartcheck sinatra

Then edit the generated file by adding your checks on it and restart your server. Now you should be able to make a HTTP request for /monitoring and get a JSON response that contains the status for each monitored service.

HTTP Routes

Basic health check

To get the status for all services, make a HTTP request for the following URI:

/monitoring

It will return a JSON response and a status for each service.

Functional status

Functional services are services essential for your application. You can get their status using the following route:

/monitoring/functional

Info route

This route returns custom information about your app. You can configure it to return whatever information you want:

/monitoring/info

Dev status

Returns some debugging information:

/monitoring/dev

Very basic health check

Returns a simple ok if the app is running. It does not execute any configured checks:

/monitoring/health_check

Plugins

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/locaweb/heartcheck.

About

A simple way to check if everything is good in your app

License:MIT License


Languages

Language:Ruby 100.0%