After launching logstash: logstash --log.leve=debug -f .etc/logstash/mypipeline.yml
it fails with the following info:
:message=> @Expected one of the #, input, filter, output at line 4
And that doesnt make any sense, as both of the config files mentioned in the pipeline above work perfectly when launched separately. So there is something wrong with the mypipeline.yml file.
concatenating two logstash files into one (echo ... >> combined.config) is readable by logstash, but second output also collects data from the first output and two indexes are being duplicated. So this approach doesn't work.
My next approach is to use conditionals to select desired output...which I don't really like as I'd like to use the power of pipelines.
That is not now you pass pipeline definitions to Logstash. If you look at the documentation the pipeline definition should be placed in a file called pipelines.yml in the setting folder.
Does it not solve the issue? The files referenced in the pipelines.yml file can be in any location. If you want the pipelines.yml file in a different location you can specify it through the path.settings setting in the logstash.yml file.
Ok will check this in 2hrs. Meanwhile, could you please tell me what's the maximum number of input files for the logstash? I have seen this information somewhere (max of 2) and I think I run into same issue.
When I use YML file with more than 2 inputs (I had 3), only third one has been processed.
Is there a limit or some kind of common mistake or something I forgot about?
I have upgraded logstash to the latest version and now it is ok.
Second question: How do I pass logstash.yml in the cli? I tried using --path.settings and using -f, but then path.settings [my_pipelines.yml_location] is being treated as config file and it throws an error that input/output was expected
I was just thinking, how should I . run logstash so it picks up one of the pipelines? Currently I got:
live_pipelines.yml
debug_pipelines.yml
test_pipelines.yml
When I start logstash without any parameters, it looks for pipelines.yml.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.