Make datasource UID editable in GUI #45230
Replies: 12 comments 4 replies
-
What about making the data source into a variable with the instance name filter machtich only one name? |
Beta Was this translation helpful? Give feedback.
-
Dunno. "Export for sharing externally" already kinda does 90% of the work here as it replaces UID with "${DS_INFLUXDB}" but that doesn't help if your instance has more than one influxdb database used. |
Beta Was this translation helpful? Give feedback.
-
This is also a huge issue for us, as we have air-gapped networks that have similar dashboards, and we can no longer import/export dashboards between the environments. We need a solution. |
Beta Was this translation helpful? Give feedback.
-
PLEASE TELL ME IF THIS WILL BREAK ANY OTHER PART OF CONFIG Example:
schema:
|
Beta Was this translation helpful? Give feedback.
-
Anyone know exactly what Grafana version brought in the change to the JSON spec to now include datasource UIDs? I'm looking for the highest version I could roll back to where I won't hit issues in our cross environment dashboard provisioning that has been impacted by UIDs in the dashboard JSON Edit: Answering my own question. It came out in 8.3.0 via #33817 |
Beta Was this translation helpful? Give feedback.
-
It would be great to have the possibility of not exporting the UID, but also the database name! |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm facing the same error. Did you find a solution for this ? |
Beta Was this translation helpful? Give feedback.
-
@youssefbenfarhat we just changed our datasources to have same UID between sites (via provisioning) but that's a half measure |
Beta Was this translation helpful? Give feedback.
-
Hey @youssefbenfarhat , @XANi Stumbled across this post this morning after encountering a similar issue provisioning a dashboard across sites (with different datasource UIDs) . An alternative workaround -
to this - This allowed us to share dashboards between sites where the datasources were similarly named (eg prometheus), but had different UIDs. Hope that helps . |
Beta Was this translation helpful? Give feedback.
-
Ran into this today. Made a new panel in the test env, exported the dashboard JSON to our helmchart to deploy across the enterprise. Next morning, emails from confused users because of "datasource not found" because even though the datasource definition is identical (same helm chart) across all clusters, the generated UID is different between test and prod. If I could enforce a uid string in a datasource definition, like we can with dashboard definitions, that might help. |
Beta Was this translation helpful? Give feedback.
-
The "fix" for it currently is provisioning datasources via JSON files rather than via UI and keeping consistent UID |
Beta Was this translation helpful? Give feedback.
-
Hello, as you may have heard, we are transitioning away from using discussions to discuss feature requests. We are migrating this discussion to an issue and closing the discussion. The issue is #82962. Feel free to continue the discussion around this there. Thank you! |
Beta Was this translation helpful? Give feedback.
-
Previously, as long as 2 grafana instances (say dev and prod, or dc1 and dc2) had identically named data sources it was relatively straightforward to either export/import dashboards between them manually or automate that.
That was hacky (it relied on 2 instances having same name for data source), and caused problems with renaming ( #1664 #33817 ) but generally worked.
But in recent version exported dashboard JSON now contains UID.
Now name of the data source is user-controllable but UID is not, which means only way for new instance to accept dashboards exported from old instance is either:
It would be useful if there was an option to change the datasouce UID, either in web config (altho that would possibly require migrating existing ones), or to have it as option during export.
Beta Was this translation helpful? Give feedback.
All reactions