class Fluent::OutHostedGraphite
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_hosted_graphite.rb, line 11 def configure(conf) super # end
emit(tag, es, chain)
click to toggle source
# File lib/fluent/plugin/out_hosted_graphite.rb, line 34 def emit(tag, es, chain) chain.next es.each do |time,record| @metric_key.each do |metric_key| record.select do |k,v| if metric_key.include?(k) metric = record[k].to_f post_metrics(k, metric) end end end end end
post_metrics(metric_key, metric)
click to toggle source
# File lib/fluent/plugin/out_hosted_graphite.rb, line 48 def post_metrics(metric_key, metric) HostedGraphite.api_key = @api_key case @protocol when "http" HostedGraphite.protocol = HostedGraphite::HTTP when "tcp" HostedGraphite.protocol = HostedGraphite::TCP when "udp" HostedGraphite.protocol = HostedGraphite::UDP end HostedGraphite.send_metric(metric_key, metric) #result = HostedGraphite.send_metric(metric_key, metric) #puts "debug_out: #{@api_key} #{@protocol} - #{metric_key} - #{metric}\n" end
shutdown()
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_hosted_graphite.rb, line 21 def shutdown super # ... end
start()
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_hosted_graphite.rb, line 16 def start super # ... end