diff --git a/lib/logstash/inputs/stdin.rb b/lib/logstash/inputs/stdin.rb index d065e2b09..f09df4235 100644 --- a/lib/logstash/inputs/stdin.rb +++ b/lib/logstash/inputs/stdin.rb @@ -27,7 +27,7 @@ class LogStash::Inputs::Stdin < LogStash::Inputs::Base data = $stdin.sysread(16384) @codec.decode(data) do |event| decorate(event) - event["host"] = @host + event["host"] = @host if !event.include?("host") queue << event end rescue EOFError, LogStash::ShutdownSignal