Hi everyone. Recently, I am trying to add more comments to my Logstash pipeline config so that it is more understandable. However, I found that it seems comments cannot be added in-between lines of a plugin config.
For example, the following pipeline will result in the error given configuration is invalid. Reason: Expected one of [ \t\r\n], "#", "{", "}"
:
input {
http {}
}
filter {
mutate {
copy => {
# Copy `source` to `source2`
source => 'source2'
# Copy `target` to `target2`
target => 'target2'
}
}
}
output {
stdout {
codec => rubydebug
}
}
But the following pipeline is fine:
input {
http {}
}
filter {
mutate {
copy => {
# Copy `source` to `source2`
source => 'source2'
target => 'target2'
# Copy `target` to `target2`
}
}
}
output {
stdout {
codec => rubydebug
}
}
It would be greatly appreciated if anyone could let me know what's the problem -maybe it is just me overlooking somewhere in the documentation stating the first pipeline is not a valid.