-
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 support to export dashboard to Beat #7239
Conversation
libbeat/kibana/client.go
Outdated
@@ -246,6 +246,22 @@ func (client *Client) ImportJSON(url string, params url.Values, jsonBody map[str | |||
|
|||
func (client *Client) Close() error { return nil } | |||
|
|||
// GetDashboard returns the dashboard with the given id with the index pattern removed | |||
func (c *Client) GetDashboard(id string) (common.MapStr, error) { |
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.
receiver name c should be consistent with previous receiver name client for Client
05aa12a
to
6e61482
Compare
Currently to export a Dashboard from the Kibana exporter API it has to be done manually or the Beats repository must be used. To simplify the exporting of own dashboards the command `beat export dashboard --id="dashboard-id"` is added. This should allow all users to export their own dashboards. The output is written to stdout, so the expected usage is to pipe it into a file inside the `kibana/dashboards/6` directory. For the Kibana connection settings it uses the setting from `setup.kibana.*`. If none are set it uses the defaults.
6e61482
to
373245d
Compare
@dedemorton I was not sure where I should put the docs for this one. Suggestions? |
@ruflin There are a few places where we should talk about exporting dashboards:
TBH, I think we have overloaded the getting started topics in the reference guide. We should have a separate section that tells users how to work with the assets (like dashboards) that Beats deploys. Customizing and exporting our dashboards isn't just a developer task, I think. Someday.... |
note that I've created a related enhancement request here: #7243 |
@dedemorton Thanks for the pointers. Will open a follow up PR with the docs changes. |
In elastic#7239 support to export a dashboard is a added to each Beat. This is expected to be used by users. The export_dashboard script from the Beats repository is expected by the Devs and contributors which want to add new dashboards. In elastic#7224 the dashboards are modified to be stored with decoded json objects for better versioning. This change modifies the export dashboard script so it generates the same decoded output so no additional conversion is needed. Note: The export_dashboard script could need some cleanup but I didn't tackle this in this PR and leave it for later to keep the change to a minimum.
In #7239 support to export a dashboard is a added to each Beat. This is expected to be used by users. The export_dashboard script from the Beats repository is expected by the Devs and contributors which want to add new dashboards. In #7224 the dashboards are modified to be stored with decoded json objects for better versioning. This change modifies the export dashboard script so it generates the same decoded output so no additional conversion is needed.
Follow up from elastic#7239
* Add document for beat export dashboard Follow up from #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
* 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)
Currently to export a Dashboard from the Kibana exporter API it has to be done manually or the Beats repository must be used. To simplify the exporting of own dashboards the command
beat export dashboard --id="dashboard-id"
is added. This should allow all users to export their own dashboards.The output is written to stdout, so the expected usage is to pipe it into a file inside the
kibana/dashboards/6
directory.For the Kibana connection settings it uses the setting from
setup.kibana.*
. If none are set it uses the defaults.