How to import a config file into Docker Container of Logstash?

Hey all,

I worked out the solution, which may help anyone else who is following in my footsteps. All that I document below was in the online Logstash 7.4.0 documentation, just spread around in different locations.

The first thing you must do is edit a settings file here: /usr/share/logstash/config/logstash.yml

You need to add a line telling Logstash where your configuration files is:

http.host: 0.0.0.0
path.config: /usr/share/logstash/config/logstash.conf                   <<========================
xpack.monitoring.elasticsearch.hosts: http://10.10.10.10:9200

That second line is what I added. Then, I made sure the config file I wanted was in that location. Finally, I restarted the LS docker container. When the container restarted, it was using the config file I wanted.

2 Likes