I'm have a config file(.conf) which I use currently to run logstash on docker. In the same directory I also have a simple pipelines.yml and logstash.yml files. When running these in docker I get no errors whatsoever and all is running fine.
I made some changes to the .conf file and wish to test it before I restart docker to apply the changes. I ran the following command:
docker run -it -v /etc/logstash/conf.d/:/usr/share/logstash/config/ docker.elastic.co/logstash/logstash:7.0.0 /usr/share/logstash/bin/logstash -t -f /usr/share/logstash/config/logstash.conf
but I keep getting this error:
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
[INFO ] 2019-04-24 12:12:28.546 [main] writabledirectory - Creating directory {:setting=>"path.queue", :path=>"/usr/share/logstash/data/queue"}
[INFO ] 2019-04-24 12:12:28.554 [main] writabledirectory - Creating directory {:setting=>"path.dead_letter_queue", :path=>"/usr/share/logstash/data/dead_letter_queue"}
[WARN ] 2019-04-24 12:12:28.795 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
Configuration OK
[INFO ] 2019-04-24 12:12:32.893 [LogStash::Runner] runner - Using config.test_and_exit mode. Config Validation Result: OK. Exiting Logstash
I tried changing -f to --path.settings but got the same error. How can I test my configuration file?