Skip to content

Commit

Permalink
[Docs] Add topic about running Journalbeat on docker (elastic#9386)
Browse files Browse the repository at this point in the history
* [Docs] Add topic about running Journalbeat on docker

* Updated shared docker content to include Journalbeat condition
  • Loading branch information
dedemorton authored Jan 10, 2019
1 parent 0d1d2e7 commit b882136
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
15 changes: 15 additions & 0 deletions journalbeat/docs/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ tar xzvf {beatname_lc}-{version}-linux-x86_64.tar.gz

endif::[]

[[docker]]
*docker:*

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

Version {stack-version} of {beatname_uc} has not yet been released.

endif::[]

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

See <<running-on-docker, Running on Docker>> for deploying Docker containers.

endif::[]

[id="{beatname_lc}-configuration"]
=== Step 2: Configure {beatname_uc}

Expand Down
1 change: 1 addition & 0 deletions journalbeat/docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
:deb_os:
:rpm_os:
:linux_os:
:docker_platform:
:no_dashboards:

include::{libbeat-dir}/docs/shared-beats-attributes.asciidoc[]
Expand Down
4 changes: 3 additions & 1 deletion journalbeat/docs/setting-up-running.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This section includes additional information on how to set up and run
* <<command-line-options>>
* <<running-with-systemd>>
* <<shutdown>>

* <<running-on-docker>>

//MAINTAINERS: If you add a new file to this section, make sure you update the bulleted list ^^ too.

Expand All @@ -29,6 +29,8 @@ include::{libbeat-dir}/docs/keystore.asciidoc[]

include::{libbeat-dir}/docs/command-reference.asciidoc[]

include::./running-on-docker.asciidoc[]

include::{libbeat-dir}/docs/shared-systemd.asciidoc[]

include::{libbeat-dir}/docs/shared-shutdown.asciidoc[]
10 changes: 5 additions & 5 deletions libbeat/docs/shared-docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ifndef::apm-server[]
Running {beatname_uc} with the setup command will create the index pattern and
load visualizations, dashboards, and machine learning jobs. Run this command:

ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="metricbeat") or ("{beatname_lc}"=="heartbeat")]
ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="metricbeat") or ("{beatname_lc}"=="heartbeat") or ("{beatname_lc}"=="journalbeat")]
["source", "sh", subs="attributes"]
--------------------------------------------
docker run \
Expand Down Expand Up @@ -114,16 +114,16 @@ curl -L -O {dockerconfig}
One way to configure {beatname_uc} on Docker is to provide +{beatname_lc}.docker.yml+ via a volume mount.
With +docker run+, the volume mount can be specified like this:

ifeval::["{beatname_lc}"=="filebeat"]
ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="journalbeat")]
["source", "sh", subs="attributes"]
--------------------------------------------
docker run -d \
--name=filebeat \
--name={beatname_lc} \
--user=root \
--volume="$(pwd)/{beatname_lc}.docker.yml:/usr/share/filebeat/filebeat.yml:ro" \
--volume="$(pwd)/{beatname_lc}.docker.yml:/usr/share/{beatname_lc}/{beatname_lc}.yml:ro" \
--volume="/var/lib/docker/containers:/var/lib/docker/containers:ro" \
--volume="/var/run/docker.sock:/var/run/docker.sock:ro" \
{dockerimage} filebeat -e -strict.perms=false \
{dockerimage} {beatname_lc} -e -strict.perms=false \
-E output.elasticsearch.hosts=["elasticsearch:9200"] <1> <2>
--------------------------------------------
endif::[]
Expand Down

0 comments on commit b882136

Please sign in to comment.