How to Programmatically Select Multiple Datasource Per Environment

I have two elasticsearch index per environment. One for dev and int and another for prod.

There are two sets of these indexes, 1 set for dev and int and another set for prod.

Each of these indexes is mapped as a data source in Grafana.

I want the Grafana to be able to use the correct set of indexes if they select either dev, int or prod.

How can I have Grafana select to correct set of indexes when the user selects a particular?

Thanks

Kurt

Hi,

Are you saying that you want to have a dashboard where the user can select dev/int or prod from a menu and then all panels on the dashboard will load the related index?

Yes, exactly.
User selects “dev”, grafana points to index2
User selects “int”, grafana points to index2
User selecta “prod”, grafana pointes to index1

Hi @kshull ,

You should be able to accomplish this using variables.

I would check out this tutorial and see if it helps.