-
What Grafana version and what operating system are you using?
11.1.3v
-
What are you trying to achieve?
We are looking for a setup, where we have two datasources, one is normal and other is backup (used during outage). This will be same for all the dashboards.
We are seeing if we can set datasource1 as normal and datsource2 as outage in the backend and show only normal and outage in the dashboard, if we select normal is dashboard query should run from datasource1 and with outage from datasource2.
-
How are you trying to achieve it?
We’re trying out by using template variables
Is there any way we can achieve this?
Hi,
I don’t think you can alias the datasource - considering this answer on Stack, Grafana already uses key:value pairs to pass id of the datasource.
But I also think (it’s only my opinion though), is something like this a good way? Imagine having 100 dashboards and now datasource1 is misbehaving. You’d have to change datasource1 to datasource2 in all your dashboards and potentially, alerts. Wouldn’t it be better to have one datasource in Grafana and only changing the URL of the desired datasource backend? Or having some kind of proxy between datasource and Grafana (some nginx / kong) which would decide which datasource should be queried?