Skip to content

Commit 712acbf

Browse files
author
Toby McLaughlin
committed
Update Docker docs for v6 (#8587)
* Update Docker docs for v6 * De-hyphenate "open source" in Docker docs
1 parent b1b7a79 commit 712acbf

File tree

2 files changed

+50
-15
lines changed

2 files changed

+50
-15
lines changed

docs/static/docker.asciidoc

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
[[docker]]
22
=== Running Logstash on Docker
33
Docker images for Logstash are available from the Elastic Docker
4-
registry.
4+
registry. The base image is https://hub.docker.com/_/centos/[centos:7].
55

6-
The base image is https://hub.docker.com/_/centos/[centos:7] and the source
7-
code can be found on
8-
https://github.com/elastic/logstash-docker/tree/{branch}[GitHub].
6+
A list of all published Docker images and tags can be found at
7+
https://www.docker.elastic.co[www.docker.elastic.co]. The source code can be
8+
found on https://github.com/elastic/logstash-docker/tree/{branch}[GitHub].
99

10-
The images are shipped with https://www.elastic.co/products/x-pack[X-Pack]
11-
installed.
10+
==== Image types
11+
12+
The images are available in two different configurations or "flavors". The
13+
`x-pack` flavor, which is the default, ships with X-Pack features
14+
pre-installed. The `oss` flavor does not include X-Pack, and contains only
15+
open source Logstash.
16+
17+
NOTE: https://www.elastic.co/guide/en/x-pack/current/index.html[X-Pack] is
18+
pre-installed in the default image. With X-Pack installed, Logstash expects to
19+
connect to an Elasticsearch cluster that is also running X-Pack, in order to
20+
publish data for the {xpack-ref}/monitoring.html[Monitoring] component.
1221

1322
==== Pulling the image
1423
Obtaining Logstash for Docker is as simple as issuing a +docker
@@ -23,22 +32,22 @@ endif::[]
2332

2433
ifeval::["{release-state}"!="unreleased"]
2534

26-
The Docker image for Logstash {logstash_version} can be retrieved with
27-
the following command:
35+
Docker images can be retrieved with the following commands:
2836

2937
["source","sh",subs="attributes"]
3038
--------------------------------------------
3139
docker pull {docker-image}
40+
docker pull {docker-repo}-oss:{logstash_version}
3241
--------------------------------------------
3342

3443
endif::[]
3544

36-
==== Configuring Logstash for Docker
45+
=== Configuring Logstash for Docker
3746

3847
Logstash differentiates between two types of configuration:
3948
<<config-setting-files,Settings and Pipeline Configuration>>.
4049

41-
===== Pipeline Configuration
50+
==== Pipeline Configuration
4251

4352
It is essential to place your pipeline configuration where it can be
4453
found by Logstash. By default, the container will look in
@@ -77,14 +86,14 @@ behaviour that you are observing, ensure that your pipeline
7786
configuration is being picked up correctly, and that you are replacing
7887
either +logstash.conf+ or the entire +pipeline+ directory.
7988

80-
===== Settings
89+
==== Settings
8190

8291
The image provides several methods for configuring settings. The conventional
8392
approach is to provide a custom `logstash.yml` file, but it's
8493
also possible to use environment variables to define settings.
8594

8695
[[docker-bind-mount-settings]]
87-
==== Bind-mounted settings files
96+
===== Bind-mounted settings files
8897

8998
Settings files can also be provided through bind-mounts. Logstash
9099
expects to find them at +/usr/share/logstash/config/+.
@@ -127,7 +136,8 @@ ADD config/ /usr/share/logstash/config/
127136
Be sure to replace or delete `logstash.conf` in your custom image, so
128137
that you don't retain the example config from the base image.
129138

130-
==== Environment variable configuration
139+
[[docker-env-config]]
140+
===== Environment variable configuration
131141

132142
Under Docker, Logstash settings can be configured via environment
133143
variables. When the container starts, a helper process checks the environment
@@ -156,6 +166,29 @@ bind-mounted from the host system. Thus, it is not reccomended to
156166
combine the bind-mount technique with the environment variable technique. It
157167
is best to choose a single method for defining Logstash settings.
158168

169+
==== Docker defaults
170+
The following settings have different default values when using the Docker
171+
images:
172+
173+
[horizontal]
174+
`http.host`:: `0.0.0.0`
175+
`path.config`:: `/usr/share/logstash/pipeline`
176+
177+
In the `x-pack` image, the following additional defaults are also set:
178+
179+
[horizontal]
180+
`xpack.monitoring.elasticsearch.url`:: `http://elasticsearch:9200`
181+
`xpack.monitoring.elasticsearch.username`:: `logstash_system`
182+
`xpack.monitoring.elasticsearch.password`:: `changeme`
183+
184+
These settings are defined in the default `logstash.yml`. They can be overridden
185+
with a <<docker-bind-mount-settings,custom `logstash.yml`>> or via
186+
<<docker-env-config,environment variables>>.
187+
188+
IMPORTANT: If replacing `logstash.yml` with a custom version, be sure to copy the
189+
above defaults to the custom file if you want to retain them. If not, they will
190+
be "masked" by the new file.
191+
159192
==== Logging Configuration
160193

161194
Under Docker, Logstash logs go to standard output by default. To

docs/static/getting-started-with-logstash.asciidoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,10 @@ endif::[]
174174

175175
==== Docker
176176

177-
An image is available for running Logstash as a Docker container. It is
178-
available from the Elastic Docker registry. See {logstash-ref}/docker.html[Running Logstash on Docker] for
177+
Images are available for running Logstash as a Docker container. They are
178+
available from the Elastic Docker registry.
179+
180+
See <<docker,Running Logstash on Docker>> for
179181
details on how to configure and run Logstash Docker containers.
180182

181183
[[first-event]]

0 commit comments

Comments
 (0)