Merge pull request #583 from divanikus/master

Add slope and metric group for ganglia output.
This commit is contained in:
Jordan Sissel 2013-08-31 22:12:57 -07:00
commit a732b06c20

View file

@ -35,6 +35,12 @@ class LogStash::Outputs::Ganglia < LogStash::Outputs::Base
# Lifetime in seconds of this metric # Lifetime in seconds of this metric
config :lifetime, :validate => :number, :default => 300 config :lifetime, :validate => :number, :default => 300
# Metric group
config :group, :validate => :string, :default => ""
# Metric slope, represents metric behavior
config :slope, :validate => %w{zero positive negative both unspecified}, :default => "both"
def register def register
require "gmetric" require "gmetric"
end # def register end # def register
@ -59,8 +65,10 @@ class LogStash::Outputs::Ganglia < LogStash::Outputs::Base
:units => @units, :units => @units,
:type => @metric_type, :type => @metric_type,
:value => localvalue, :value => localvalue,
:tmax => @tmax, :group => @group,
:dmax => @dmax :slope => @slope,
:tmax => @max_interval,
:dmax => @lifetime
}) })
end # def receive end # def receive
end # class LogStash::Outputs::Ganglia end # class LogStash::Outputs::Ganglia