simple-graphite

A simple interface to Graphite.

How-to

%w{rubygems simple-graphite}.each { |l| require l }
g = Graphite.new({:host => "your.graphite.host", :port => 2003})

or

g = Graphite.new
g.host = 'your.graphite.host'
g.port = 2003

To push data to Graphite:

g.push_to_graphite do |graphite|
  graphite.puts "your.metric.name 3.1415926 #{g.time_now}"
end

Or:

g.send_metrics({
  'foo.bar1' => 250,
  'foo.bar2' => 114
})

Note on Patches/Pull Requests

Copyright © 2010 Ian Meyer. See LICENSE for details.