Can I pass the DataSource to another Dashboard in a Datalink?

I currently have a dashboard that allows the user to drill down into the information presented. We have several different environments (DEV, TEST, PROD)… all with identical databases. I would really like to have one set of dashboards and have the user choose the environment (the datasource) on the top level dashboard and have that value passed to the “drill down” dashboards. But I haven’t been able to find a way to pass the datasource in a datalink URL.

Is this possible? (Hopefully I am explaining it clearly)

1 Like

What is/are your data sources?

MS SQL Databases. All of the databases are identical, just the hostnames are different.

Create a dashboard var with key value : environments

Prod : sql01, dev : sqldev02, qa : sqlqa01

In datasources change datasourxe to

$environments

Try that I am away from keyboard

But using the same account for all of them sounds very suspect.

i would totally disapprove this if it was me.

Instead I would go with 3 different grafana host in each environ

They all have different logins, so they would need to actually be different DataSources.

I can have a Dashboard variable that allows the user to pick the DataSource, but there is no way (that I can find) to pass that value in a DataLink to another page.

When you bring up the data link if you start typing you would see all kinds of system data including variables. Let me check

Not sure how you would have different data sources along with the variable approach I recommended. Maybe that is not what you want

Edit

Ok I got it now, pass it to data links :+1:

Type dollar sign $ and you get

Notice environs variable

http://google.com/${environs}