Connect a role to a space

I have a case where we have 1 dashboard for all clients (created in the default space) with index pattern client_*. (includes: client_1 , client_2_ and so on..) example names...

I created a space for each client ,so it's account manager will be able to see (only) it's data in there: space_1, space_2 etc...

the problem is that the account manager, manages more clients, so i can't limit the indices permission only to a single client.

the required goal is that when choosing the space "space_1", and going to the dashboard, it will use only "client_1_ " index and not client_2 for example, and when choosing "space_2", and going to the dashboard, he will see only the data of "client_2_ index".

is there a way to achieve it with roles/ space configuration?

Hi, you can use multiple index patterns, one per client. Each client-specific space has the corresponding client-specific index pattern and a copy of the dashboard. You can easily copy objects across spaces now in Kibana but in this case you will need to make sure that each copy of your dashboard points to the right client-specific index pattern.

Thanks a lot. @ArisP
The index pattern is defined in the visualization level. But it seems to be impossible to change index pattern for most of them after creation. Can I change it in the dashboard level or during import somehow?

You are very welcome. Could you try the following, after you back up your saved objects as required? Go to Management / Saved Objects. Find the visualisation of which you want to change the underlying index pattern and click Actions / Inspect. In the view that opens up, find the "references" text area and you should see "type":"index-pattern". You can replace the index pattern that the particular vis references by replacing the value of the "id" field in this area, with the "target" index pattern id you actually want it to reference. You can find each "target" index pattern's id in the address bar when you select it from within the Saved Objects management view. The id should follow the #/management/kibana/index_patterns/ url chunk. Things can break easily on the level below the UI, so please take extra care not to lose any work.

Can I do it via api?

This API should do the job:

Again, please use with extra care not to lose any work.

1 Like

It seems to be on master only

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