In case someone uses the following config in pipeline.yml:
- pipeline.id: "demo"
pipeline.ecs_compatibility: disabled
pipeline.workers: 3
pipeline.batch.size: 5
config.string: |
input {
generator {
lines => [
'{"hello": "world"}'
]
count => 1
}
}
filter
{
json {
source => "message"
remove_field => [ "message" ]
}
output
{
file {
path => "/tmp/somefile.ndjson"
codec => json_lines
}
}
Note the:
Then, a default stdout output is added.
This is confusing as this behavior is not documented.
Possible solutions:
- Make the regex
|
OUTPUT_BLOCK_RE = /output *{/ |
match also newlines or spaces between output and {
- Log a
WARN if the default output is added
In case someone uses the following config in
pipeline.yml:Note the:
Then, a default
stdoutoutput is added.This is confusing as this behavior is not documented.
Possible solutions:
logstash/logstash-core/lib/logstash/config/source/local.rb
Line 36 in 0875e0b
outputand{WARNif the default output is added