-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add document for beat export dashboard #7696
Conversation
Follow up from elastic#7239
@dedemorton TBH was not 100% sure where to put it. This is basically a middle ground that allows people to export dashboards also without having to check out the Beats source code and build it. We don't really have this yet in the dev guide. Alternative would be to put it in all guides where we list other commands? |
@ruflin I'll take a closer look at this PR tomorrow. I do think we should add this to the command reference, too. I can take that on in a separate PR. I keep thinking I should bump the command reference up one level in the TOC. It won't change any of the URLs, but might make it more visible. WDYT? (Would mean breaking the content out into separate topics, though, due to asciidoc's limitation about single-chapter sections.) |
After your comment I realised this should definitively go into the command reference and not the dev guide. I moved it. The reason is that the export methods we use in the dev guide produce a different format of dashboards which is used for contributing. The format created by export dashboard is to be used directly if the loading mechanism in Beat. As commands become more important +1 on moving them up. I had a hard time to find it under |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to edit this content in a separate PR (just minor stuff, but it'll be easier than peppering your review with comments).
|
||
|
||
*`dashboard`*:: | ||
Exporting a dashboard allows to to store a dashboard on disk in a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo "to to"
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 a Beat. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change "a Beat" to {beatname_uc} (since this doc appears in each book).
@dedemorton Comments addressed. Looking forward to a bigger refactoring here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ruflin Really sorry, but somehow this fell off the back of my wagon. I think I was busy the day I got the review request, because I didn't look very closely and missed a few things.
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, missed this during my first review. You need to add a space after configuration,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the example contains an asciidoc reference, you need to replace line 122 with:
["source","yaml",subs="attributes"]
*`dashboard`*:: | ||
Exporting a dashboard allows to store a dashboard on disk in a | ||
module and load it automatically. The following command can be used: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a plus +
here so the example gets indented correctly.
---- | ||
$ {beatname_lc} export dashboard --id="dashboard-id" > dashboard.json | ||
---- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a plus +
here so the text below gets indented correctly.
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}. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a plus +
here so the text below gets indented correctly.
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. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a plus +
here so the text below gets indented correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review comments applied.
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I promise I won't keep doing this, but I noticed a couple more minor nits that I missed before.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ruflin in order for the attribute to resolve
`{beatname_lc} setup dashboards`
needs to be
+{beatname_lc} setup dashboards+
```
Sorry for missing *another* problem. Sigh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
Why does the tick not work here and have to use +
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asciidoc treats everything within back ticks as text. Using plus signs forces asciidoc to evaluate the asciidoc references first.
+ | ||
["source","shell",subs="attributes"] | ||
---- | ||
$ {beatname_lc} export dashboard --id="dashboard-id" > dashboard.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't show $ in the other examples (makes copy/pasting harder).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense. I wonder why I have it here. Pretty sure i copied from somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Add document for beat export dashboard Follow up from elastic#7239 * move to command reference * address review comments * review comments applied * apply review feedback
* Add document for beat export dashboard Follow up from elastic#7239 * move to command reference * address review comments * review comments applied * apply review feedback
* Add document for beat export dashboard Follow up from elastic#7239 * move to command reference * address review comments * review comments applied * apply review feedback
…7937 #7939 #7948 #7949 #7950) (#8188) * Reset modulename attribute at the end of a file (#7888) * Add safeguard related statements for max_backoff setting (#7889) * Add docs about append_fields (#7903) * Add docs about append_fields * Remove experimental tag from setup.template.json.enabled description * Metricbeat: Add compatibility notes where missing (#7939) * Metricbeat: Add compatibility notes where missing, based on integration tests * Added review suggestions * Add missing config options to Logstash section of reference.yml (#7883) Closes #3062 * Fix processor autodiscovery docs for Filebeat (#7937) { needs escaping as otherwise asciidoc will show an empty code block. * Add document for beat export dashboard (#7696) * Add document for beat export dashboard Follow up from #7239 * move to command reference * address review comments * review comments applied * apply review feedback * Replace golang with Go (#7948) I've been told that using "golang" instead of "Go" is considered a faux pas in some circles. :-) I've replaced instances in the external docs, but I did not update the changelog, readmes, or code files. * Minor fixes to attributes in module docs (#7949) * Add recommendation to avoid harvesting symlinks when dealing with file rotation (#7950)
…tic#7903 elastic#7937 elastic#7949) (elastic#7996) * Add document for beat export dashboard (elastic#7696) * Add safeguard related statements for max_backoff setting (elastic#7889) * Add docs about append_fields (elastic#7903) * Fix processor autodiscovery docs for Filebeat (elastic#7937) * Minor fixes to attributes in module docs (elastic#7949)
Follow up from #7239