From 471c3606c0841a48f8a6ff8430721dc6c1a8be74 Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Fri, 17 Aug 2018 01:47:04 +0200 Subject: [PATCH] Add document for beat export dashboard (#7696) * Add document for beat export dashboard Follow up from https://github.com/elastic/beats/pull/7239 * move to command reference * address review comments * review comments applied * apply review feedback --- libbeat/docs/command-reference.asciidoc | 35 ++++++++++++++++++++----- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/libbeat/docs/command-reference.asciidoc b/libbeat/docs/command-reference.asciidoc index e2f37f911aa5..a6d666e78b73 100644 --- a/libbeat/docs/command-reference.asciidoc +++ b/libbeat/docs/command-reference.asciidoc @@ -14,7 +14,7 @@ :global-flags: Also see <>. -: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 <> :modules-command-short-desc: Manages configured modules @@ -77,7 +77,7 @@ endif::[] [options="header"] |======================= -|Commands | +|Commands | |<> |{export-command-short-desc}. |<> |{help-command-short-desc}. |<> |{keystore-command-short-desc}. @@ -96,8 +96,8 @@ Also see <>. ==== `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* @@ -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 @@ -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* @@ -690,4 +714,3 @@ the _Beats Platform Reference_ for more information. *`-v, --v`*:: Logs INFO-level messages. -