From b882136d0c28d69cbe4c7bd1466692d0c63ae700 Mon Sep 17 00:00:00 2001 From: DeDe Morton Date: Wed, 9 Jan 2019 19:05:37 -0800 Subject: [PATCH] [Docs] Add topic about running Journalbeat on docker (#9386) * [Docs] Add topic about running Journalbeat on docker * Updated shared docker content to include Journalbeat condition --- journalbeat/docs/getting-started.asciidoc | 15 +++++++++++++++ journalbeat/docs/index.asciidoc | 1 + journalbeat/docs/setting-up-running.asciidoc | 4 +++- libbeat/docs/shared-docker.asciidoc | 10 +++++----- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/journalbeat/docs/getting-started.asciidoc b/journalbeat/docs/getting-started.asciidoc index d19c3ebcaebf..f598948a93e3 100644 --- a/journalbeat/docs/getting-started.asciidoc +++ b/journalbeat/docs/getting-started.asciidoc @@ -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 <> for deploying Docker containers. + +endif::[] + [id="{beatname_lc}-configuration"] === Step 2: Configure {beatname_uc} diff --git a/journalbeat/docs/index.asciidoc b/journalbeat/docs/index.asciidoc index 2be11c39c8cb..48194e4607b9 100644 --- a/journalbeat/docs/index.asciidoc +++ b/journalbeat/docs/index.asciidoc @@ -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[] diff --git a/journalbeat/docs/setting-up-running.asciidoc b/journalbeat/docs/setting-up-running.asciidoc index 3610eabead11..8969c14981a6 100644 --- a/journalbeat/docs/setting-up-running.asciidoc +++ b/journalbeat/docs/setting-up-running.asciidoc @@ -19,7 +19,7 @@ This section includes additional information on how to set up and run * <> * <> * <> - +* <> //MAINTAINERS: If you add a new file to this section, make sure you update the bulleted list ^^ too. @@ -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[] diff --git a/libbeat/docs/shared-docker.asciidoc b/libbeat/docs/shared-docker.asciidoc index 385aca5c45b9..43c3dc1d54cb 100644 --- a/libbeat/docs/shared-docker.asciidoc +++ b/libbeat/docs/shared-docker.asciidoc @@ -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 \ @@ -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::[]