Draw RRD Graphs
RRDGrapher is my attempt at designing an application capable of drawing meaningful dynamic graphs from RRD files.
This project is built as a Rack middleware providing you the with the tools you need to build you own views as you see fit, the middleware will provide:
You can have a look at the example_app folder which is a fully working application.
The main goal of this project is to allow easy creation of graphs from rrd files stored by any tool capable of it (the source really does not matter). Here is a features list:
This one may go into another gem but lives there for now, I made a monitoring demon to receive collectd packets and trigger alerts by reacting on the data received.
Here s what the demon can monitor:
The demon is desgined as a library and require an eventmachine reactor to run, here is a minimal application using it (check the documentation or the source code for more informations):
require 'rubygems'
require 'bundler/setup'
require 'rrd-grapher/notifier'
puts "Notifier started."
EM::run do
RRDNotifier::Server.start do |s|
s.register_alarm("*", "ping", "ping_droprate", :max => 5)
s.register_alarm("*", "uptime", "uptime", :monitor_presence => 2*60)
s.register_alarm("*", "load", "load", :max => 1, :index => 1)
s.register_alarm("*", "memory/*", "memory/active", :monitor_presence => 1)
end
end
If you wan to contribute to this project, here how to do it (in the root folder):
$ bundle
Now you have all the require gems run guard, it will monitor the sources files and rebuild the results as you change them (coffeescript, sass). It will also package all the js files with sprockets in one file.
$ bundle exec guard (will take one console)
You can also force a full rebuild of everything with (coffeescript + sprockets):
$ rake build
Last thing you will certainly need is to start a webserver, any should do but I currently use unicorn
$ unicorn