What Grafana version and what operating system are you using?
Grafana v12.0.2 (NOT in a Docker container), RHEL8
What are you trying to achieve?
find the best practice for setting up connections to the data sources across more than once instance of Grafana.
We have 3 separate environments: Development, PreLive and Production.
We have an instance of Grafana installed in each.
When we copy a dashboard from one instance to another, the JSON specifies a UID for that datasource in each panel. As the datasource UIDs don’t match in each environment, I’m having to do a find/replace before importing the JSON.
I saw a post that mentions setting up a dashboard variable for the datasource instead.
I can see how to do this but I’m assuming that when i come to copy over Alert rules, I’m going to run into the same sort of issue.
Is there a way go into the Grafana backend somehow and change the UIDs so I can make them the same in all 3 environments?
Does anyone have any better suggestions?
What’s the best practice here?
ooh. That looks interesting. I wasn’t aware of that facility.
So if I define my datasources in a yaml, Grafana will pick them up and use them.
I take it I can set the UIDs for them there?
As I’ve already got Grafana instances with the datasources in place, is there a way to export the settings ready for the yaml file?
Failing that, could someone point me in the direction of a page explaining how I define all the parameters?
I’ve got sources I’ll need to replicate for InfluxDB (v2), Loki & Infinity.
Thanks all!