How to run multiple instances in docker container?

I want to run multiple config files in docker container.
pipelines.yml file :

- main
  path.config: "/usr/share/logstash/config/conf.d/*.conf"

- i2c_req_res
  path.config: "/usr/share/logstash/config/conf.d.i2c_req_res/*.conf"

- flinks
  path.config: "/usr/share/logstash/config/conf.d.flinks/*.conf"

- engines
  path.config: "/usr/share/logstash/config/conf.d.engines/*.conf"

Now I am wondering how to run file. Is it way to define name in the config file or not.

If I'm good understood You want to run multiple config file under one What are the intentions of this?

-> It's seems that You have a right config in yaml file.

You can run such docker container through docker-compose
an example file:

more docker-compose.yml
version: "3"
      - "9610:9600"
      - "9201:9200"
      - "5050:5044"
      - /home/test/docker/pipeline/:/usr/share/logstash/pipeline/
      - /home/test/docker/conf/jvm.options:/usr/share/logstash/config/jvm.options
      - /home/test/docker/conf/pipelines.yml:/usr/share/logstash/config/pipelines.yml
      - /home/test/docker/conf/logstash.yml:/usr/share/logstash/config/logstash.yml
      - /home/test/test/:/elastic/
      - /home/mstestdr/docker/sincedb/:/usr/share/logstash/sincedb/
      driver: "json-file"
        max-size: "1g"
        max-file: "10"

Yes Dear, I want to run multiple config file.

so You have already defined name of in pipeline.yml it should work as You intended

1 Like

Dear I found alternate of this I just used if condition in each config file. Now it not conflicting with each other. I am not getting method.

Thanks For Response Dear.

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