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

Cherry-pick of #3805: Print error when downloading dashboards #3845

Merged
merged 1 commit into from
Mar 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ https://github.com/elastic/beats/compare/v5.2.2...v5.3.0[View commits]
*Affecting all Beats*

- Add `_id`, `_type`, `_index` and `_score` fields in the generated index pattern. {pull}3282[3282]
- Fix potential elasticsearch output URL parsing error if protocol scheme is missing. {pull}3671[3671]
- Improve error message when downloading the dashboards fails. {pull}3805[3805]

*Filebeat*

Expand Down
4 changes: 2 additions & 2 deletions libbeat/dashboards/dashboards/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,12 @@ func (imp Importer) ImportArchive() error {
url := imp.cfg.SnapshotURL
archive, err = imp.downloadFile(url, target)
if err != nil {
return fmt.Errorf("Failed to download snapshot file: %s", url)
return fmt.Errorf("Failed to download snapshot file: %s. Error: %v", url, err)
}
} else if imp.cfg.URL != "" {
archive, err = imp.downloadFile(imp.cfg.URL, target)
if err != nil {
return fmt.Errorf("Failed to download file: %s", imp.cfg.URL)
return fmt.Errorf("Failed to download file: %s. Error: %v", imp.cfg.URL, err)
}
} else {
return errors.New("No archive file or URL is set - please use -file or -url option")
Expand Down