fixing gelf input. remove timestamp. bump gelfd ver

Signed-off-by: John E. Vincent <lusis.org+github.com@gmail.com>
This commit is contained in:
John E. Vincent 2011-11-10 21:52:21 -05:00
parent 56b3202df2
commit 319c90d0e7
3 changed files with 3 additions and 6 deletions

View file

@ -29,7 +29,7 @@ gem "gelf" # outputs/gelf, # License: MIT-style
gem "statsd-ruby", "0.3.0" # outputs/statsd, # License: As-Is
gem "gmetric", "0.1.3" # outputs/ganglia, # License: MIT
gem "xmpp4r", "0.5" # outputs/xmpp, # License: As-Is
gem "gelfd", "0.1.0" #inputs/gelf, # License: Apache 2.0
gem "gelfd", "0.2.0" #inputs/gelf, # License: Apache 2.0
gem "ffi-rzmq", "0.9.0"
gem "ruby-debug", "0.10.4"

View file

@ -28,8 +28,7 @@ class LogStash::Inputs::Gelf < LogStash::Inputs::Base
# Default is true
#
# Remapping converts the following:
# full_message => event.message
# timestamp => event.timestamp
# full_message to event.message
# host + file => event.source
config :remap, :validate => :boolean, :default => true
@ -100,8 +99,6 @@ class LogStash::Inputs::Gelf < LogStash::Inputs::Base
private
def remap_gelf(event)
event.message = event.fields["full_message"]
event.timestamp = LogStash::Time.to_iso8601(
DateTime.strptime(event.fields["timestamp"].to_s, "%Q" ))
event.source = "gelf://#{event.fields["host"]}#{event.fields["file"]}"
end # def remap_gelf
end # class LogStash::Inputs::Gelf

View file

@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "bunny" # for amqp support, MIT-style license
spec.add_dependency "cabin", "0.1.3" # for logging. apache 2 license
spec.add_dependency "filewatch", "~> 0.3.0" # for file tailing, BSD License
spec.add_dependency "gelfd", "~> 0.1.0" #inputs/gelf, # License: Apache 2.0
spec.add_dependency "gelfd", "~> 0.2.0" #inputs/gelf, # License: Apache 2.0
spec.add_dependency "gelf" # outputs/gelf, # License: MIT-style
spec.add_dependency "gmetric", "~> 0.1.3" # outputs/ganglia, # License: MIT
spec.add_dependency "haml" # License: MIT