mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
- Add fields and timestamp from to gelf
This commit is contained in:
parent
9fdbe250a2
commit
9decdf7f03
1 changed files with 5 additions and 0 deletions
|
@ -25,6 +25,11 @@ class LogStash::Outputs::Gelf < LogStash::Outputs::Base
|
|||
source = URI.parse(event.source)
|
||||
gelf.host = source.host
|
||||
gelf.file = source.path
|
||||
|
||||
event.fields.each do |name, value|
|
||||
gelf.add_additional name, value
|
||||
end
|
||||
gelf.add_additional "@timestamp", event.timestamp
|
||||
gelf.send
|
||||
end # def event
|
||||
end # class LogStash::Outputs::Stdout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue