Open
Description
Each panel in the Grafana dashboards are tied directly to a specific datasource ID at the point it is imported, rather than being a variable in of itself.
In the case that a Grafana instance has multiple data sources, this makes it difficult to switch between different deployments of an application in the same dashboard.
It would be useful if the dashboards instead defined a Data Source variable and referenced that instead for easy switching.
For example:
{
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
}
// The actual panel...
}
],
"templating": {
"list": [
{
"current": {
"selected": true,
"text": "Prometheus Production-EU-WEST-1",
"value": "Prometheus Production-EU-WEST-1"
},
"hide": 0,
"includeAll": false,
"multi": false,
"name": "prometheus",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
}
}