Skip to content
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

Merged
merged 5 commits into from
Aug 16, 2018

Conversation

ruflin
Copy link
Collaborator

@ruflin ruflin commented Jul 24, 2018

Follow up from #7239

@ruflin
Copy link
Collaborator Author

ruflin commented Jul 24, 2018

@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 ruflin added the review label Jul 24, 2018
@dedemorton
Copy link
Contributor

dedemorton commented Jul 24, 2018

@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.)

@ruflin
Copy link
Collaborator Author

ruflin commented Jul 25, 2018

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 Setting up ....

Copy link
Contributor

@dedemorton dedemorton left a 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
Copy link
Contributor

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.
Copy link
Contributor

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).

@ruflin
Copy link
Collaborator Author

ruflin commented Jul 26, 2018

@dedemorton Comments addressed. Looking forward to a bigger refactoring here.

Copy link
Contributor

@dedemorton dedemorton left a 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
Copy link
Contributor

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,

Copy link
Collaborator Author

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]
Copy link
Contributor

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:

Copy link
Contributor

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
----

Copy link
Contributor

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}.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Collaborator Author

@ruflin ruflin left a 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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@dedemorton dedemorton left a 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
Copy link
Contributor

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.

Copy link
Collaborator Author

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?

Copy link
Contributor

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
Copy link
Contributor

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).

Copy link
Collaborator Author

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.

Copy link
Contributor

@dedemorton dedemorton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ruflin ruflin added the needs_backport PR is waiting to be backported to other branches. label Aug 16, 2018
@dedemorton dedemorton merged commit 471c360 into elastic:master Aug 16, 2018
dedemorton pushed a commit to dedemorton/beats that referenced this pull request Aug 17, 2018
* Add document for beat export dashboard

Follow up from elastic#7239

* move to command reference

* address review comments

* review comments applied

* apply review feedback
jsoriano pushed a commit that referenced this pull request Aug 17, 2018
…#7996)

* Add document for beat export dashboard (#7696)
* Add safeguard related statements for max_backoff setting (#7889)
* Add docs about append_fields (#7903)
* Fix processor autodiscovery docs for Filebeat (#7937)
* Minor fixes to attributes in module docs (#7949)
@dedemorton dedemorton removed the needs_backport PR is waiting to be backported to other branches. label Aug 18, 2018
dedemorton pushed a commit to dedemorton/beats that referenced this pull request Aug 30, 2018
* Add document for beat export dashboard

Follow up from elastic#7239

* move to command reference

* address review comments

* review comments applied

* apply review feedback
dedemorton pushed a commit to dedemorton/beats that referenced this pull request Aug 31, 2018
* Add document for beat export dashboard

Follow up from elastic#7239

* move to command reference

* address review comments

* review comments applied

* apply review feedback
dedemorton added a commit that referenced this pull request Sep 4, 2018
…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)
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants