How to use a dashboard with a different index pattern

I have an index with a dashboard i have set up for it. When i create a new index and create a new user with permissions to only read a second index, i can still see the dashboard i created for the first index, but i can't see any data, i believe because when i export the dashboard it is exported with a reference to the index pattern id of the first index i created (even if i export it with "?exclude=index-pattern"). I thought about changing the reference to the id of the second index pattern when i import the dashboard, but i didnt find a way to acquire that index pattern id (which looks something like this: 78ad1180-da14-11e9-82b4-13e6e0aff3d8). So i guess i want to know:

  1. Is it possible to configure a dashboard created for another index to work with a different one?
  2. If not, would changing the reference to the index pattern work?
  3. If so, how do i make a request to get the index pattern id?

your post is so confusing to read because it just says other new index.
But I think you want something like this correct?

index1 - access to user1 - dashboard1
index2 - access to user2 - dashboard2

looks like you need to explore space.

I'm sorry if I did not express myself very well. I actually want something like this:
Index1 - access to user1 - dashboard1
Index2 - access to user2 - dashboard1
I want to reuse the dashboard I created with both indexes. What do you mean explore space?

I have edited the post for clarity

when you export after 7.2 version. it does in ndjason format it has option to export everething associated with that dashboard including index pattern

you will have to remove id from that it should look something like this.
you remove id listed in bold. save it and import it back. (don't have to remove id listed first.)
this will only work if you exporting this on seperate space.

test this with just one visulization and it will make sense.

"id":"43f36cb0-2587-11e9-984d-89f1c9a3de6b","migrationVersion":{"visualization":"7.3.1"},"references":[{"id":"7a7b9830-b47e-11e9-846f-91ad527daecf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2019-09-19T18:26:58.411Z","version":"WzYyNiwyXQ=="}

I believe if you importing in same space (which is default) then you will have to remove both id.

1 Like

That still did not work for me, or i did not understand what you meant. I did not know about the spaces feature, it seems very interesting, but removing the id and importing it into another space just causes the data to show an error message over the visualizations with "Cannot read property 'filter' of undefined". I would have to replace that id with the id of the second index pattern, im guessing, but i dont know how to get the second pattern's id, which was my third question.

Oh, i figured it out, if i do it manually, it works. If i export it and ask to import it in the second space without importing the pattern, it prompts me to select a replacement pattern. That is exactly what i want, but the thing is, i wanted to do it programatically, with REST requests. How would i do that?

I wanted to do same. but seems like not an option at this time. (not straight forward) or I didn't find it.

I have many space and many dashboard with many viz and wanted to save them periodically for backup. but didn't find export/import option using REST that is easy to do.

search this forum and you will find many discussion about it

1 Like

Check this out

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