I can run multiple config file

logstash -f .\config1\sample_1.conf
and
logstash -f .\config1\sample_2.conf

without a problem :
[2019-04-03T16:51:38,043][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-04-03T16:51:38,361][FATAL][logstash.runner ] Logstash could not be started because there is already another instance using the configured data directory. If you wish to run multiple instances, you must change the "path.data" setting.
[2019-04-03T16:51:38,410][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

So how can I run those 2 config files without maken a whole new directory

You have to use a different path.data directory for the second instance. I just create a new directory every time I run logstash

#!/bin/sh

TMPDIR=/tmp/logstash-data/$$
trap '/bin/rm -rf $TMPDIR' 0 1 2 3 6
/usr/share/logstash/bin/logstash --path.data $TMPDIR [...]

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