Skip to content

Cherry-pick #20150 to 7.x: Log debug message if the Kibana dashboard can not be imported#22760

Merged
kvch merged 1 commit intoelastic:7.xfrom
kvch:backport_20150_7.x
Nov 25, 2020
Merged

Cherry-pick #20150 to 7.x: Log debug message if the Kibana dashboard can not be imported#22760
kvch merged 1 commit intoelastic:7.xfrom
kvch:backport_20150_7.x

Conversation

@kvch
Copy link
Copy Markdown
Contributor

@kvch kvch commented Nov 25, 2020

Cherry-pick of PR #20150 to 7.x branch. Original message:

This PR is the updated verion of a community contribution which was abandoned in #13387. The original PR description is the following:

As described in #12211, depending on the value of setup.dashboards.beat there is a required directory structure for successful import of the Kibana dashboards from the archive file.

This PR adds additional path in case when no Kibana dashboards can be imported from the archive file, which logs debug message as shown below:

2019-08-29T22:40:00.122+0200    DEBUG   [dashboards]    dashboards/kibana_loader.go:146 Unzip archive /tmp/tmp263803916
2019-08-29T22:40:00.126+0200    DEBUG   [dashboards]    dashboards/kibana_loader.go:146 Importing Kibana from /tmp/tmp263803916/kibana/filebeat
.. 
// this is added 
2019-08-29T22:40:00.126+0200    DEBUG   [dashboards]    dashboards/kibana_loader.go:146 Skipping import of /tmp/tmp263803916/kibana/filebeat directory. Beat name: metricbeat, base dir name: filebeat.
// end

2019-08-29T22:40:00.126+0200    INFO    instance/beat.go:776    Kibana dashboards successfully loaded.

Implementation of point 2 from #12211 proposal.

There is a table in #12211 that contains test cases for this issue, but I currently don't know how to mock all necessary dependencies and implement unit tests for this without too much changes in libbeat/dashboards/importer.go.

I see that there are some integration tests for loading dashboards in libbeat/tests/system/test_dashboard.py so I'll check those out.

Fixes #12211
Closes #13387

…ed from the archive (elastic#12211) (elastic#20150)

There is a predefined combination of directory structure and setup.dashboards.beat property that has to be defined to successfully import dashboards to the Kibana.

Co-authored-by: dplavcic <dalibor.plavcic@gmail.com>
(cherry picked from commit c2bb3f0)
@kvch kvch added [zube]: In Review backport Team:Services (Deprecated) Label for the former Integrations-Services team labels Nov 25, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 25, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/integrations-services (Team:Services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 25, 2020
@botelastic
Copy link
Copy Markdown

botelastic bot commented Nov 25, 2020

This pull request doesn't have a Team:<team> label.

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #22760 opened

  • Start Time: 2020-11-25T12:57:39.799+0000

  • Duration: 62 min 56 sec

Test stats 🧪

Test Results
Failed 0
Passed 16618
Skipped 1393
Total 18011

Steps errors 2

Expand to view the steps failures

Terraform Apply on x-pack/metricbeat/module/aws

  • Took 0 min 15 sec . View more details on here

Terraform Apply on x-pack/metricbeat/module/aws

  • Took 0 min 16 sec . View more details on here

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 16618
Skipped 1393
Total 18011

Copy link
Copy Markdown
Contributor

@michalpristas michalpristas left a comment

Choose a reason for hiding this comment

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

LGTM

@kvch kvch merged commit c16db59 into elastic:7.x Nov 25, 2020
@zube zube bot removed the [zube]: Done label Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Team:Services (Deprecated) Label for the former Integrations-Services team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants