Monitrb is a m/monit event collector which works on Sinatra and mongodb
In the main goal is be able to set a collector for monit information but we want it be easy to use to collect any information that we send to the system.
the M/monit portocol sen information over Server, Platform, Services, Events.
In the part of Services they have 8 types of events with diferent data which are:
- FILESYSTEM
- DIRECTORY
- FILE
- PROCESS
- HOST
- SYSTEM
- FIFO
- PROGRAM
Using a mongodb all the information is saved in the Service collection but with dynamic field for the especific data for each type
There's a internal collector in the url/collector you can send data with a POST request
{ 'server' : 'server_name', 'timestamp' : '2011-11-24 13:18:12 +0100', 'domain' : 'domain_name', 'type' : 'type_name', 'dataset' : { :data1 => 'data1', :data2 => 'data2', :data3 => 'data3' } }
You should have rvm installed.
% git clone % rvm create gemset monitrb % bundle install
- Change the password and username in the monitrb.rb
- Change the mongodb connection in db.rb
start the server
% rackup
In your monit script add:
set mmonit http://user:password@server:port/monit/collector
Start your monit.