Multiple pipelines syntax error

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/ `map'", "/usr/share/logstash/logstash- 
core/lib/logstash/compiler.rb:10:in `compile_sources'", 
"org/logstash/execution/ `initialize'", 
"org/logstash/execution/ `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
- 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

Could be a problem with indentation, but logstash says it read the text '# config/pipelines.yml' and you do not include that in your pipelines.yml so it may be reading some other file.

That's a comment I put above the config, hoping that's solve the problem. Alas, it didn't.

I thought I've used a wrong file: it should be config/pipelines.yml (logstash config), not actual pipelines. But after switching to the correct file the error message is the same.

Turns out, I need to enclose pipeline names into quotes. Odd enough I didn't find anything related in the official documentation. The problem solved.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.