**Note**: Other branches in this project are available:
**Note**: Other branches in this project are available:
...
@@ -90,9 +90,27 @@ The Kibana default configuration is stored in `kibana/config/kibana.yml`.
...
@@ -90,9 +90,27 @@ The Kibana default configuration is stored in `kibana/config/kibana.yml`.
## How can I tune Logstash configuration?
## How can I tune Logstash configuration?
The logstash configuration is stored in `logstash/config/logstash.conf`.
The Logstash container is using the [shipped configuration](https://github.com/elastic/logstash-docker/blob/master/build/logstash/config/logstash.yml).
The folder `logstash/config` is mapped onto the container `/etc/logstash/conf.d` so you
If you want to override the default configuration, create a file `logstash/config/logstash.conf` and add your configuration in it.
Then, you'll need to map your configuration file inside the container in the `docker-compose.yml`. Update the logstash container declaration to:
```yml
logstash:
build:logstash/
volumes:
-./logstash/pipeline:/usr/share/logstash/pipeline
-./logstash/config:/usr/share/logstash/config
ports:
-"5000:5000"
networks:
-docker_elk
depends_on:
-elasticsearch
```
In the above example the folder `logstash/config` is mapped onto the container `/usr/share/logstash/config` so you
can create more than one file in that folder if you'd like to. However, you must be aware that config files will be read from the directory in alphabetical order.
can create more than one file in that folder if you'd like to. However, you must be aware that config files will be read from the directory in alphabetical order.
## How can I specify the amount of memory used by Logstash?
## How can I specify the amount of memory used by Logstash?
...
@@ -104,9 +122,8 @@ If you want to override the default configuration, add the *LS_HEAP_SIZE* enviro
...
@@ -104,9 +122,8 @@ If you want to override the default configuration, add the *LS_HEAP_SIZE* enviro
```yml
```yml
logstash:
logstash:
build:logstash/
build:logstash/
command:-f /etc/logstash/conf.d/
volumes:
volumes:
-./logstash/config:/etc/logstash/conf.d
-./logstash/pipeline:/usr/share/logstash/pipeline
ports:
ports:
-"5000:5000"
-"5000:5000"
networks:
networks:
...
@@ -122,7 +139,7 @@ logstash:
...
@@ -122,7 +139,7 @@ logstash:
To add plugins to logstash you have to:
To add plugins to logstash you have to:
1. Add a RUN statement to the `logstash/Dockerfile` (ex. `RUN logstash-plugin install logstash-filter-json`)
1. Add a RUN statement to the `logstash/Dockerfile` (ex. `RUN logstash-plugin install logstash-filter-json`)
2. Add the associated plugin code configuration to the `logstash/config/logstash.conf` file
2. Add the associated plugin code configuration to the `logstash/pipeline/logstash.conf` file
## How can I enable a remote JMX connection to Logstash?
## How can I enable a remote JMX connection to Logstash?
...
@@ -133,9 +150,8 @@ Update the container in the `docker-compose.yml` to add the *LS_JAVA_OPTS* envir
...
@@ -133,9 +150,8 @@ Update the container in the `docker-compose.yml` to add the *LS_JAVA_OPTS* envir
```yml
```yml
logstash:
logstash:
build:logstash/
build:logstash/
command:-f /etc/logstash/conf.d/
volumes:
volumes:
-./logstash/config:/etc/logstash/conf.d
-./logstash/pipeline:/usr/share/logstash/pipeline
ports:
ports:
-"5000:5000"
-"5000:5000"
networks:
networks:
...
@@ -148,7 +164,7 @@ logstash:
...
@@ -148,7 +164,7 @@ logstash:
## How can I tune Elasticsearch configuration?
## How can I tune Elasticsearch configuration?
The Elasticsearch container is using the shipped configuration and it is not exposed by default.
The Elasticsearch container is using the [shipped configuration](https://github.com/elastic/elasticsearch-docker/blob/master/build/elasticsearch/elasticsearch.yml).
If you want to override the default configuration, create a file `elasticsearch/config/elasticsearch.yml` and add your configuration in it.
If you want to override the default configuration, create a file `elasticsearch/config/elasticsearch.yml` and add your configuration in it.