README.markdown

Monittr

Monittr provides a Ruby interface for the Monit systems management system. Its main goal is to aggregate statistics from multiple Monit instances and display them in an attractive web interface.

Monittr loads XML from the web server embedded in Monit and makes it accessible as Ruby objects. It also provides helpers for Sinatra applications, to display the information as HTML. You can insert the statistics into any page, or create a dedicated one. You can use the default template, or create your own. The default template is located in lib/monittr/sinatra/template.erb and pictured below.

Usage

First, clone or download
the sources from Github, to get the latest version:

$ git clone http://github.com/karmi/monittr.git
$ cd monittr

You can try the Ruby interface in a IRB console:

$ irb -Ilib -rubygems -rmonittr

You have to pass one or more URLs to a local or remote Monit HTTP server:

cluster = Monittr::Cluster.new ['http://localhost:2812/']

In case you don't have a running Monit server at hand, use the provided FakeWeb setup: