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

Visualizations exported in old format #20565

Closed
dibyadas opened this issue Jul 9, 2018 · 7 comments
Closed

Visualizations exported in old format #20565

dibyadas opened this issue Jul 9, 2018 · 7 comments
Labels
Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@dibyadas
Copy link

dibyadas commented Jul 9, 2018

Kibana version:6.2.4

Elasticsearch version:6.0+

Server OS version:From elastic.co

Browser version:Firefox 60

Browser OS version:

Original install method (e.g. download page, yum, from source, etc.):From elastic.co

Describe the bug:
While exporting visualizations or dashboards from Kibana, it seems that it is being exported in the old format. What I mean is, the way it was before 6.x.x, i.e, before the removal of multiple mapping types, even though by doing es.search('.kibana') shows that the data is present in the new format (type='doc').

Steps to reproduce:

  1. Create a visualization and export it
  2. Compare it against the data present under .kibana index

Actual behavior:
{ "_id": "my-vis-id", "_type": "visualization", "_source": { "title": "my-vis-title", "visState": "{\"title\":.....}", "uiStateJSON": "{}", "description": "", "version": 1, "kibanaSavedObjectMeta": { "searchSourceJSON": "{\"index\":\....}" } } }
Expected behavior:
{ ' _id': 'visualization:my-vis-id, '_type': 'doc', '_source': { 'type': 'visualization', 'visualization': { 'description': '', 'kibanaSavedObjectMeta': {'searchSourceJSON': '{"index":"...}'}, 'title': 'my-vis-id', 'uiStateJSON': '{}', 'version': 1, 'visState': '{"aggs"...}'}} }
And this is indeed what is found under .kibana index.

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

@chrisdavies
Copy link
Contributor

I suspect this is really an implementation detail. Theoretically, exported files can be of any format, provided the import correctly handles them and gets them back into the index correctly.

@dibyadas
Copy link
Author

dibyadas commented Jul 9, 2018

Agreed. But I guess it is more sensible to export it in the format the way it exists in ES index. And one compelling reason for me to say so is that, what if I have to directly push the exported visualization, with some modifications, to .kibana since there's no API available to us to create visualization/dashboard programmatically and update it? (In fact, this is exactly what I'm trying to do currently)

@alexfrancoeur
Copy link

@dibyadas there is a new experimental API documented here that would allow for programmatic CRUD capabilities for saved objects (including index patterns).

@chrisronline does #17426 resolve this issue from the UI perspective?

@dibyadas
Copy link
Author

@alexfrancoeur Thanks for the info. Unfortunately, the ELK stack was recently updated and the Kibana version we have now is 6.2.4 where this experimental API seems to be absent. Also, since it's experimental, which means that it will(?) go through a lot of breaking changes and may even be removed in the future(?), as mentioned. Hence, right now, pushing directly to .kibana seems a better option to me rather than using this API.
Also, I'm really hoping for an official API to be released that would allow us to create visualization/dashboards/index-pattern programmatically.

@chrisronline
Copy link
Contributor

@alexfrancoeur I'm not seeing any UI-specific issue discussed here? With that said however, I don't think any of my changes in #17426 will address this

@alexfrancoeur
Copy link

@dibyadas actually, the API was there in 6.2.4. We introduced this initially in 5.5 (#11632). We've made some tweaks through the minors but you should be able to utilize the API in your current version. Yes this is experimental and it's possible there will be breaking changes to come, but it will be the API we are moving forward with for this use case.

That being said, I think it's fine writing directly to the .kibana index today, however we will be making some changes that may affect accessing the .kibana index depending on your environment. For more detail on those changes, please read up on #18178

@chrisronline thank you. I had assumed initially that While exporting visualizations or dashboards from Kibana, it seems that it is being exported in the old format. referenced the UI specifically. That may not have been the case.

@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages and removed :Management DO NOT USE labels Nov 27, 2018
@flash1293
Copy link
Contributor

By now exporting visualizations is done in a standardized format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

7 participants