Skip to content

Commit

Permalink
update command reference as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan A authored and simitt committed Mar 22, 2018
1 parent 2a56a1e commit e525ccb
Showing 1 changed file with 68 additions and 14 deletions.
82 changes: 68 additions & 14 deletions docs/copied-from-beats/command-reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<keystore,secrets keystore>>
: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
++++
<titleabbrev>Command reference</titleabbrev>
++++

{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 <<global-flags,global flags>>
for controlling global behaviors.
Expand All @@ -57,6 +56,9 @@ endif::[]
<<help-command,`help`>>::
{help-command-short-desc}.

<<keystore-command,`keystore`>>::
{keystore-command-short-desc}.

ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="metricbeat")]

<<modules-command,`modules`>>::
Expand Down Expand Up @@ -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 <<keystore>> for more examples.


ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="metricbeat")]

[[modules-command]]
Expand Down Expand Up @@ -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.
Expand All @@ -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"]

Expand Down Expand Up @@ -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.
Expand All @@ -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::[]
Expand Down

0 comments on commit e525ccb

Please sign in to comment.