-
What Grafana version and what operating system are you using?
Grafana 10.X -
What are you trying to achieve?
Give alias name or change display name to the MS-SQL DataSource(s) names in the specific Grafana Dashboard (not in the original created Data Source) -
How are you trying to achieve it?
We have 3 environment, Test, UAT and PROD
Data Source: MS SQL Server
I have created Datasource variable called “environment” and pointed MS SQL Server.
So this variable “environment” is available in my dashboard using which I could switch between the environment.
In the drop-down the Data source name are displaying as Test, UAT and PROD (the data source has been created in this name only). Now I want to display it as ApplicationName-TEST, ApplicationName-UAT and ApplicationName-PROD. -
What happened?
I do not find any option to Alias the data source names which I am getting via data source variable “environment” -
What did you expect to happen?
I want to display TEST, UAT and PROD it as ApplicationName-TEST, ApplicationName-UAT and ApplicationName-PROD only in my specific dashboard. I do not want to change the originally created data source name.
try creating the variable as key value pair
ApplicationName-TEST : TEST
then on datasource pn dash board use ${environment:value}
Hi, thanks for your reply.
I done with this ApplicationName-TEST : TEST
I don’t understand then on datasource pn dash board use ${environment:value}
I am new to grafana, could you please explain in detail.
Also how can I link it to my panels, so based on changed to ApplicationName-TEST/ ApplicationName-UAT my query should run for the selected environment.
Please advise
@yosiasz
Yes, the way mentioned in the thread only I am switching between different sources.
But I am not sure about “Business Variable plugin to list environments” where can I see this and how should I link?
Please share any threads or related links
that is what I shared will do. are your data sources ms sql?
Already I have created Datasource variable called “environment” and pointed MS SQL Server.
Using this variable created “environment” I could switch between the environment.
In the drop-down the Data source name are displaying as Test, UAT and PROD because the data source has been created in this name only.
Now only for I display purpose I need to display the data source name as ApplicationName-TEST, ApplicationName-UAT and ApplicationName-PROD, but it should have the same funcionality i.e., if I choose ApplicationName-TEST, only TEST environment values I should get .
Also as you mentioned I created Key Value Pair, but how I should link to the data source variable?


