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

[Libbeat] Log debug message if the Kibana dashboard can not be imported from the archive (#12211) #13387

Closed
wants to merge 1 commit into from
Closed

[Libbeat] Log debug message if the Kibana dashboard can not be imported from the archive (#12211) #13387

wants to merge 1 commit into from

Conversation

dplavcic
Copy link
Contributor

@dplavcic dplavcic commented Aug 29, 2019

Fixes #12211

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.

@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

1 similar comment
@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@kvch kvch self-requested a review August 29, 2019 08:52
…ed from the archive (#12211)

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.
@dplavcic dplavcic changed the title [Libbeat] If no Kibana dashboards can be imported from archive file log error and exit (#12211) [Libbeat] Log debug message if the Kibana dashboard can not be imported from the archive (#12211) Aug 29, 2019
@dplavcic dplavcic marked this pull request as ready for review August 29, 2019 21:11
@ph
Copy link
Contributor

ph commented Feb 28, 2020

jenkins test this

@ph
Copy link
Contributor

ph commented Feb 28, 2020

@kvch Can you review this please?

@ph ph added the Team:Services (Deprecated) Label for the former Integrations-Services team label Feb 28, 2020
@kvch
Copy link
Contributor

kvch commented Mar 12, 2020

@dplavcic Could you please rebase the branch so we can merge your PR?

@botelastic
Copy link

botelastic bot commented Jul 17, 2020

Hi!
We just realized that we haven't looked into this PR in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it in as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@dplavcic
Copy link
Contributor Author

dplavcic commented Oct 2, 2020

I didn't saw a notification about this until now. Anyways, thanks for merging this in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stalled Team:Services (Deprecated) Label for the former Integrations-Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to load kibana dashboards from zip file
5 participants