From 22a5831ed1ea9c9caea5c6aff56f11735963ac6d Mon Sep 17 00:00:00 2001 From: jalvz Date: Mon, 26 Feb 2018 16:07:45 +0100 Subject: [PATCH] Incorporate doc updates from https://github.com/elastic/beats/pull/6184 --- .../command-reference.asciidoc | 12 ++++++++-- docs/copied-from-beats/keystore.asciidoc | 23 +++++++++++-------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/docs/copied-from-beats/command-reference.asciidoc b/docs/copied-from-beats/command-reference.asciidoc index a8e4cda293d..02f20350312 100644 --- a/docs/copied-from-beats/command-reference.asciidoc +++ b/docs/copied-from-beats/command-reference.asciidoc @@ -19,7 +19,15 @@ :keystore-command-short-desc: Manages the <> :modules-command-short-desc: Manages configured modules :run-command-short-desc: Runs {beatname_uc}. This command is used by default if you start {beatname_uc} without specifying a command + +ifeval::["{has_ml_jobs}"=="yes"] :setup-command-short-desc: Sets up the initial environment, including the index template, Kibana dashboards (when available), and machine learning jobs (when available) +endif::[] + +ifeval::["{has_ml_jobs}"!="yes"] +:setup-command-short-desc: Sets up the initial environment, including the index template, Kibana dashboards (when available) +endif::[] + :test-command-short-desc: Tests the configuration :version-command-short-desc: Shows information about the current version @@ -31,7 +39,7 @@ Command reference ++++ -{beatname_uc} provides a command-line interface for running the Beat and +{beatname_uc} provides a command-line interface for starting {beatname_uc} and performing common tasks, like testing configuration files and loading dashboards. The command-line also supports <> for controlling global behaviors. @@ -164,7 +172,7 @@ Specifies the name of the command to show help for. [[keystore-command]] ==== `keystore` command -{keystore-command-short-desc}. +{keystore-command-short-desc}. *SYNOPSIS* diff --git a/docs/copied-from-beats/keystore.asciidoc b/docs/copied-from-beats/keystore.asciidoc index faab29222a8..7bdae05603e 100644 --- a/docs/copied-from-beats/keystore.asciidoc +++ b/docs/copied-from-beats/keystore.asciidoc @@ -13,30 +13,33 @@ === Secrets keystore When you configure {beatname_uc}, you might need to specify sensitive settings, -such as passwords. Relying on the file system to protect these values is not -sufficient. {beatname_uc} provides a keystore for storing secret values to use -in configuration settings. +such as passwords. Rather than relying on file system permissions to protect +these values, you can use the {beatname_uc} keystore to securely store secret +values for use in configuration settings. -Unlike the Elasticsearch keystore, the {beatname_uc} keystore does not store -actual configuration settings. Instead, you add a key and secret value to the -keystore, and then use the key in place of the secret value when you configure -sensitive settings. +After adding a key and its secret value to the keystore, you can use the key in +place of the secret value when you configure sensitive settings. The syntax for referencing keys is identical to the syntax for environment variables: `${KEY}` -Where KEY is the name of the key. +Where KEY is the name of the key. For example, imagine that the keystore contains a key called `ES_PWD` with the value `yourelasticsearchpassword`: * In the configuration file, use `output.elasticsearch.password: "${ES_PWD}"` -* On the command line, use: `-E "output.elasticsearch.password=${ES_PWD}"` +* On the command line, use: `-E "output.elasticsearch.password=${ES_PWD}"` When {beatname_uc} unpacks the configuration, it resolves keys before resolving -environment variables and other variables. +environment variables and other variables. + +Notice that the {beatname_uc} keystore differs from the Elasticsearch keystore. +Whereas the Elasticsearch keystore lets you store `elasticsearch.yml` values by +name, the {beatname_uc} keystore lets you specify arbitrary names that you can +reference in the {beatname_uc} configuration. To create and manage keys, use the `keystore` command. See the <> for the full command syntax, including