Cherry-pick #20150 to 7.x: Log debug message if the Kibana dashboard can not be imported #22760
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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