Skip to content

Commit

Permalink
fixing gelf input. remove timestamp. bump gelfd ver
Browse files Browse the repository at this point in the history
Signed-off-by: John E. Vincent <[email protected]>
  • Loading branch information
lusis committed Nov 11, 2011
1 parent 56b3202 commit 319c90d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 1 addition & 4 deletions lib/logstash/inputs/gelf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -100,8 +99,6 @@ def udp_listener(output_queue)
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
2 changes: 1 addition & 1 deletion logstash.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 319c90d

Please sign in to comment.