class Notify::Graphite
Constants
- VERSION
Public Class Methods
new(host, port=2003, basename=nil)
click to toggle source
# File lib/notify/graphite.rb, line 38 def initialize(host, port=2003, basename=nil) @basename = ["events", basename].compact.join('.') @client = ::CarbonClient.new(host+":"+port.to_s) end
Public Instance Methods
send_event(event_name)
click to toggle source
# File lib/notify/graphite.rb, line 43 def send_event(event_name) @client.sendMetric(@basename+"."+event_name, 1) #TODO: we should also send a "normal" graphite event to the json api. end