Understanding running logstash container command


(marxper) #1

Hello every one,
I'm working on creating the container logstash using docker run
I found this commande and i want to understand what is means ,

docker run -d --name=logstash --restart=unless-stopped --link elasticsearch:elasticsearch -v /srv/docker/logstash/etc:/config-dir --volumes-from syslog-ng logstash:2.3 -f /config-dir/logstash.conf

/srv/docker/logstash/etc:/config-dir : i don't understand the config-dir , i'm expecting a path not this
-f : i don't understanf the -f option why it's used

Thank you for your help


(Magnus Bäck) #2

/srv/docker/logstash/etc:/config-dir : i don't understand the config-dir , i'm expecting a path not this

The -v /srv/docker/logstash/etc:/config-dir option will cause the host path /srv/docker/logstash/etc to be available as /config-dir inside the container.

-f : i don't understanf the -f option why it's used

The -f option and the pathname that follows are passed to Logstash.

https://www.elastic.co/guide/en/logstash/current/running-logstash-command-line.html


(marxper) #3

Thank you for your response,
I understand now every option in the commande , but in the same time i want to ask you about the logstash config-dir.
I want to know where exactelly i can put my config file inside the container,
is in /etc/logstash or /usr/share/logstash/config
Thank you.


(Magnus Bäck) #4

It depends on the image you're using and how it invokes Logstash.


(marxper) #5

I'm using logstash:2


(system) #6

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