Skip to content

Commit

Permalink
Add document for beat export dashboard (#7696)
Browse files Browse the repository at this point in the history
* Add document for beat export dashboard

Follow up from #7239

* move to command reference

* address review comments

* review comments applied

* apply review feedback
  • Loading branch information
ruflin authored and dedemorton committed Aug 16, 2018
1 parent 95e53bc commit 471c360
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions libbeat/docs/command-reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

:global-flags: Also see <<global-flags,Global flags>>.

:export-command-short-desc: Exports the configuration or index template to stdout
:export-command-short-desc: Exports the configuration, index template or a dashboard 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
Expand Down Expand Up @@ -77,7 +77,7 @@ endif::[]

[options="header"]
|=======================
|Commands |
|Commands |
|<<export-command,`export`>> |{export-command-short-desc}.
|<<help-command,`help`>> |{help-command-short-desc}.
|<<keystore-command,`keystore`>> |{keystore-command-short-desc}.
Expand All @@ -96,8 +96,8 @@ Also see <<global-flags,Global flags>>.
==== `export` command

{export-command-short-desc}. You can use this
command to quickly view your configuration or the contents of the index
template.
command to quickly view your configuration, see the contents of the index
template or export a dashboard from Kibana.

*SYNOPSIS*

Expand All @@ -113,6 +113,30 @@ template.
Exports the current configuration to stdout. If you use the `-c` flag, this
command exports the configuration that's defined in the specified file.



*`dashboard`*::
Exporting a dashboard allows to store a dashboard on disk in a
module and load it automatically. The following command can be used:
+
["source","shell",subs="attributes"]
----
{beatname_lc} export dashboard --id="dashboard-id" > dashboard.json
----
+
The `dashboard-id` can be found in the Kibana URL. By default `export dashboard`
will write the dashboard to stdout. Above it's written into `dashboard.json` so
it can later imported again. The file contains the dashboard with all
visualizations and searches. The index pattern is removed as it is
expected to be loaded separately for {beatname_uc}.
+
The generated `dashboard.json` file can be copied into the `kibana/6/dashboard`
directory of {beatname_lc} and next time +{beatname_lc} setup dashboards+ is
run the dashboard will be imported.
+
In case Kibana is not running on `localhost:5061` the {beatname_uc}
configuration under `setup.kibana` must be adjusted.

[[template-subcommand]]
*`template`*::
Exports the index template to stdout. You can specify the `--es.version` and
Expand Down Expand Up @@ -176,7 +200,7 @@ Specifies the name of the command to show help for.
[[keystore-command]]
==== `keystore` command

{keystore-command-short-desc}.
{keystore-command-short-desc}.

*SYNOPSIS*

Expand Down Expand Up @@ -690,4 +714,3 @@ the _Beats Platform Reference_ for more information.

*`-v, --v`*::
Logs INFO-level messages.

0 comments on commit 471c360

Please sign in to comment.