This is a docker-compose application to run various Docker containers connected to logstash.
docker-compose
simplifies Docker containers definition and configuration using definitions declared in docker-compose.*-.yml
files.
For now, only one docker-compose.yml
Services declarations are splitted into following files, in order to be able to run only selected services:
docker-compose.beats.yml
for filebeatdocker-compose.nginx.yml
for nginx- other files for other services to come
docker-compose
command by default only uses file docker-compose.yml
.
To add more services defined in separate files, either:
- (recommended) specify list of configurations files into the
COMPOSE_FILE
variable in the.env
configuration file, for example:COMPOSE_FILE=docker-compose.yml:docker-compose.beats.yml
- use the
docker-compose
command--file /path/to/docker-compose.file.yml
option
Configuration variables can be defined using a .env
file located in the same directory as docker-compose.*-.yml
configuration files.
All variables are described in the following table and have default values that makes their definition optionnal.
Variable name | Description | Default value |
---|---|---|
NONE_YET |
None. | NONE |
Run logstash first (as root):
export _JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true"
/usr/share/logstash/bin/logstash -f $HOME/logstash-docker-helper/mounts/logstash/pipeline/beats/logstash.conf
Then start beats+nginx containers, in a separate shell:
docker-compose up --file docker-compose.nginx.yml --file docker-compose.beats.yml --remove-orphans
Then load http://192.168.56.106:8080 on host to visit Nginx home page.
Events should appear in logstash shell.