Logstash not running when configured with multiple pipline yaml configuration file

This is my pipeline configuration file -

  - pipeline.id: my-pipeline_1
      path.config: "C:\\logstash\\logstash-7.6.1\\config\\mongodata_non_mcn.conf"
    - pipeline.id: my-other-pipeline
      path.config: "C:\\logstash\\logstash-7.6.1\\config\\mongodata_comment_list.conf"

When i run this file using below commant i got this error:-
>logstash -f \logstash\logstash-7.6.1\config\pipelines.yml

Error :-
[2020-05-14T06:15:58,741][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [ \t\r\n], "#", "input", "filter", "output" at line 1, column 1 (byte 1)", :backtrace=>["C:/logstash/logstash-7.6.1/logstash-core/lib/logstash/compiler.rb:47:in compile_imperative'", "C:/logstash/logstash-7.6.1/logstash-core/lib/logstash/compiler.rb:55:in compile_graph'", "C:/logstash/logstash-7.6.1/logstash-core/lib/logstash/compiler.rb:17:in block in compile_sources'", "org/jruby/RubyArray.java:2580:in map'", "C:/logstash/logstash-7.6.1/logstash-core/lib/logstash/compiler.rb:14:in compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:161:in initialize'", "org/logstash/execution/JavaBasePipelineExt.java:47:in initialize'", "C:/logstash/logstash-7.6.1/logstash-core/lib/logstash/java_pipeline.rb:27:in initialize'", "C:/logstash/logstash-7.6.1/logstash-core/lib/logstash/pipeline_action/create.rb:36:in execute'", "C:/logstash/logstash-7.6.1/logstash-core/lib/logstash/agent.rb:326:in block in converge_state'"]}

if you run logstash with -f, it ignores pipelines.yml as per the docs

you should put pipelines.yml in path.config then run logstash without arguments. path.settings defaults to {extract.path}/config when you use .zip or .tar.gz installer. see directory layout

1 Like

@ptamba Thanks for your reply. your solution is working fine.. Thanks!!

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