From e525ccb88b721117e587ac1a598d229f77a3503c Mon Sep 17 00:00:00 2001 From: Juan A Date: Mon, 5 Feb 2018 13:00:49 +0100 Subject: [PATCH] update command reference as well --- .../command-reference.asciidoc | 82 +++++++++++++++---- 1 file changed, 68 insertions(+), 14 deletions(-) diff --git a/docs/copied-from-beats/command-reference.asciidoc b/docs/copied-from-beats/command-reference.asciidoc index 1dd132deb78..a8e4cda293d 100644 --- a/docs/copied-from-beats/command-reference.asciidoc +++ b/docs/copied-from-beats/command-reference.asciidoc @@ -16,23 +16,22 @@ :export-command-short-desc: Exports the configuration or index template to stdout :help-command-short-desc: Shows help for any command +: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) -else::[] -: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 [[command-line-options]] -=== {beatname_uc} commands +=== {beatname_uc} command reference -{beatname_uc} provides a command-line interface for starting {beatname_uc} and +++++ +Command reference +++++ + +{beatname_uc} provides a command-line interface for running the Beat and performing common tasks, like testing configuration files and loading dashboards. The command-line also supports <> for controlling global behaviors. @@ -57,6 +56,9 @@ endif::[] <>:: {help-command-short-desc}. +<>:: +{keystore-command-short-desc}. + ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="metricbeat")] <>:: @@ -159,6 +161,62 @@ Specifies the name of the command to show help for. {beatname_lc} help export ----- +[[keystore-command]] +==== `keystore` command + +{keystore-command-short-desc}. + +*SYNOPSIS* + +["source","sh",subs="attributes"] +---- +{beatname_lc} keystore SUBCOMMAND [FLAGS] +---- + +*SUBCOMMANDS* + +*`add KEY`*:: +Adds the specified key to the keystore. Use the `--force` flag to overwrite an +existing key. Use the `--stdin` flag to pass the value through `stdin`. + +*`create`*:: +Creates a keystore to hold secrets. Use the `--force` flag to overwrite the +existing keystore. + +*`list`*:: +Lists the keys in the keystore. + +*`remove KEY`*:: +Removes the specified key from the keystore. + +*FLAGS* + +*`--force`*:: +Valid with the `add` and `create` subcommands. When used with `add`, overwrites +the specified key. When used with `create`, overwrites the keystore. + +*`--stdin`*:: +When used with `add`, uses the stdin as the source of the key's value. + +*`-h, --help`*:: +Shows help for the `keystore` command. + + +{global-flags} + +*EXAMPLES* + +["source","sh",subs="attributes"] +----- +{beatname_lc} keystore create +{beatname_lc} keystore add ES_PWD +{beatname_lc} keystore remove ES_PWD +{beatname_lc} keystore list +----- + +see <> for more examples. + + ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="metricbeat")] [[modules-command]] @@ -384,10 +442,8 @@ Or: * The index template ensures that fields are mapped correctly in Elasticsearch. * The Kibana dashboards make it easier for you to visualize {beatname_uc} data in Kibana. -ifeval::["{has_ml_jobs}"=="yes"] * The machine learning jobs contain the configuration information and metadata necessary to analyze data for anomalies. -endif::[] Use this command instead of `run --setup` when you want to set up the environment without actually running {beatname_uc} and ingesting data. @@ -408,10 +464,8 @@ Sets up the Kibana dashboards only. *`-h, --help`*:: Shows help for the `setup` command. -ifeval::["{has_ml_jobs}"=="yes"] *`--machine-learning`*:: Sets up machine learning job configurations only. -endif::[] ifeval::["{beatname_lc}"=="filebeat"] @@ -534,7 +588,7 @@ For example: + ["source","sh",subs="attributes"] ---------------------------------------------------------------------- -{beatname_lc} -E "name=mybeat" -E "output.elasticsearch.hosts=["http://myhost:9200"]" +{beatname_lc} -E "name=mybeat" -E "output.elasticsearch.hosts=['http://myhost:9200']" ---------------------------------------------------------------------- + This setting is applied to the currently running {beatname_uc} process. @@ -547,7 +601,7 @@ ifeval::["{beatname_lc}"=="filebeat"] + ["source","sh",subs="attributes"] ---------------------------------------------------------------------- -{beatname_lc} -modules=nginx -M "nginx.access.var.paths=[/var/log/nginx/access.log*]" -M "nginx.access.var.pipeline=no_plugins" +{beatname_lc} -modules=nginx -M "nginx.access.var.paths=['/var/log/nginx/access.log*']" -M "nginx.access.var.pipeline=no_plugins" ---------------------------------------------------------------------- endif::[]