Reload pipeline from docker image

Hi.
we are using the Docker version of logstash. Is it possible to make it reload the configuration from the docker mounted volume. i tried using -e "CONFIG_RELOAD_AUTOMATiC=true" on the docker run command, but that does not do anything.

Any suggestions?

Regards
Jens

You don't use -e as per this page:

Also, FYI, there is a lot of ambiguity between config, settings and pipelines.

"settings" is your logstash.yml. <- this can't be reloaded automatically

Pipelines can be reloaded automatically. These are your .conf files but are referred to as your config files when talking about auto-reloading.

You need to mount your pipelines directory in a docker volume so you can edit them on the host. When you save the config, the docker image sees the change and reloads logstash's config.

You could try something like this:

BASE_DIR="/home/myusername/Logging/containers/logstash"

LOCAL_CONFIG=$BASE_DIR/config/
LOCAL_PIPELINE=$BASE_DIR/pipeline/
REMOTE_BASE=/usr/share/logstash
REMOTE_CONFIG=$REMOTE_BASE/config/
REMOTE_PIPELINE=$REMOTE_BASE/pipeline/
# RUN
docker run -it \
	--name logstash \
	-v $LOCAL_PIPELINE:$REMOTE_PIPELINE \
	-v $LOCAL_CONFIG:$REMOTE_CONFIG \
	-p 5044:5045 \
	-p 514:5144 \
	docker.elastic.co/logstash/logstash:6.6.1 \
    --config.reload.automatic
1 Like

Thank you for your reply.
It was the pipeline configuration that I wanted to be reloaded.
Somehow it started working, even with -e "CONFIG_RELOAD_AUTOMATIC=true".

Regards

Jens

1 Like

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