Importing Dashboards Issue

I am having an error importing dashboards. I was running old versions of the ELK Stack (5.5.2) and upgraded to 5.6.1. I had dashboards and visualizations that I wanted to carry over to the new version of ELK. When I exported my old dashboards into a json file and attempted to import it to the new Kibana instance it gave me an error on all of the visualizations except the timelions. It stated that the indice that was being called out in the json file was not created. All of the visualizations that were an issue were calling the index "_all". I have created the indice "_all" and it is populated with data.

This is an example of what the "searchSourceJSON" is:

"searchSourceJSON": "{\"index\":\"_all\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"

Now in previous versions when I have upgraded the ELK stack I have not had an issue with importing the dashboards this way. The error I got stated:

failed: Could not locate that index-pattern (id: _all), [click here to re-create it]

Since I had the _all index created and data was present I made a test visualization calling the index _all and exported it to a JSON file and found this:

"searchSourceJSON": "{\"index\":\"AV6p1s8QXgAtWV364jlS\",\"query\":{\"match_all\":{}},\"filter\":[]}"

In previous versions when I had the visualization use the _all index it exported to the JSON file as in the first "searchSourceJSON" block above, the index was called _all. In this version it seems that the index is based off of its ID.

In my dashboard export I replaced all the _all instances with AV6p1s8QXgAtWV364jlS, the ID for the _all index on my new ELK instance. When I imported the JSON file it now worked and no errors were present.

I think this may be an issue, but maybe someone can tell me if I did something wrong?

My question is, if I want to share my dashboards with someone else who is running their own instance of ELK, will the _all index be "AV6p1s8QXgAtWV364jlS" as well? This seems unlikely. If I am correct and the _all index ID will be different than AV6p1s8QXgAtWV364jlS for other instances of ELK, how can I share my premade dashboards and visualizations without having to go through this workaround?

Hi Colton,

There is more information on this issue here:

You are correct, in that we are now using ID's to reference the index pattern as opposed to the pattern itself. Your workaround of replacing the pattern with the ID in the export is a solution. Another possibility would be to re-create the index pattern and set the ID to _all. You can do this by toggling the advanced settings on the creating page, or by clicking that error presented when you first attempted to import the dashboard. This, however, would only work if your college also had an index pattern with the same ID.

Rest assured, we understand how frustrating this can be and we are working on a solution. There is a pull request that was opened today. This will allow you to choose which index to use during imports.

1 Like

As an update, Kibana 5.6.3 allows for the index pattern to be selected at import.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.