From 52f43a4a72dbfef0a0fe604bad384027be7c9faa Mon Sep 17 00:00:00 2001 From: Antoine Cotten Date: Thu, 2 Mar 2017 11:22:39 +0100 Subject: [PATCH] Disable X-Pack monitoring in Logstash conf Fixes #98 --- README.md | 8 +++----- docker-compose.yml | 1 + kibana/config/kibana.yml | 3 --- logstash/config/logstash.yml | 11 +++++++++++ 4 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 logstash/config/logstash.yml diff --git a/README.md b/README.md index 0e8c509..707091e 100644 --- a/README.md +++ b/README.md @@ -90,11 +90,9 @@ The Kibana default configuration is stored in `kibana/config/kibana.yml`. ## How can I tune Logstash configuration? -The Logstash container is using the [shipped configuration](https://github.com/elastic/logstash-docker/blob/master/build/logstash/config/logstash.yml). +The logstash configuration is stored in `logstash/config/logstash.yml`. -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: +It is also possible to map the entire `config` directory inside the container in the `docker-compose.yml`. Update the logstash container declaration to: ```yml logstash: @@ -111,7 +109,7 @@ logstash: ``` 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, and that Logstash will be expecting a [`log4j2.properties`](https://github.com/elastic/logstash-docker/tree/master/build/logstash/config) file for its own logging. ## How can I specify the amount of memory used by Logstash? diff --git a/docker-compose.yml b/docker-compose.yml index 5232f0a..51541af 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,6 +20,7 @@ services: logstash: build: logstash/ volumes: + - ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml - ./logstash/pipeline:/usr/share/logstash/pipeline ports: - "5000:5000" diff --git a/kibana/config/kibana.yml b/kibana/config/kibana.yml index e4bb588..166f255 100644 --- a/kibana/config/kibana.yml +++ b/kibana/config/kibana.yml @@ -5,9 +5,6 @@ server.name: kibana server.host: "0" elasticsearch.url: http://elasticsearch:9200 -elasticsearch.username: elastic -elasticsearch.password: changeme -xpack.monitoring.ui.container.elasticsearch.enabled: false ## Disable X-Pack ## see https://www.elastic.co/guide/en/x-pack/current/xpack-settings.html diff --git a/logstash/config/logstash.yml b/logstash/config/logstash.yml new file mode 100644 index 0000000..65400fb --- /dev/null +++ b/logstash/config/logstash.yml @@ -0,0 +1,11 @@ +--- +## Default Logstash configuration from logstash-docker. +## from https://github.com/elastic/logstash-docker/blob/master/build/logstash/config/logstash.yml +# +http.host: "0.0.0.0" + +## Disable X-Pack +## see https://www.elastic.co/guide/en/x-pack/current/xpack-settings.html +## https://www.elastic.co/guide/en/x-pack/current/installing-xpack.html#xpack-enabling +# +xpack.monitoring.enabled: false