Hello. I'm trying to make multipipeline in Logstash (in a container) but it says there a syntax error. What's wrong?
Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction,
:message=>"Expected one of [ \\t\\r\\n], \"#\", \"input\", \"filter\", \"output\" at line 2, column 1
(byte 24) after # config/pipelines.yml\n", :backtrace=>["/usr/share/logstash/logstash-
core/lib/logstash/compiler.rb:41:in `compile_imperative'", "/usr/share/logstash/logstash-
core/lib/logstash/compiler.rb:49:in `compile_graph'", "/usr/share/logstash/logstash-
core/lib/logstash/compiler.rb:11:in `block in compile_sources'",
"org/jruby/RubyArray.java:2584:in `map'", "/usr/share/logstash/logstash-
core/lib/logstash/compiler.rb:10:in `compile_sources'",
"org/logstash/execution/AbstractPipelineExt.java:156:in `initialize'",
"org/logstash/execution/JavaBasePipelineExt.java:47:in `initialize'",
"/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/reload.rb:37:in `execute'",
"/usr/share/logstash/logstash-core/lib/logstash/agent.rb:326:in `block in converge_state'"]}
And my pipelines.yml looks like:
# config/pipelines.yml
- pipeline.id: main
queue.type: persisted
config.string: |
input {
beats {
port => 5000
ssl => true
ssl_certificate => "/logstash.crt"
ssl_key => "/logstash.key"
}
}
output {
if [host][name] == "mysrv" {
pipeline {
send_to => mysrv
}
}
}