Sign up for a free GitHub account to open an issue and contact its maintainers and the community. "name": "DS_GRAPHITE", I don't think I have a copy handy. I have written small python script to do the workaround for you: If this gets implemented, please make sure the solution supports dashboards with a mix of different datasources. By clicking Sign up for GitHub, you agree to our terms of service and Well occasionally send you account related emails. According to the timestamps on the versions, the latest is from before the upgrade. Use that UID across all environments that your dashboards will be shared in. Thanks for contributing an answer to Stack Overflow! Follow the issue template and add additional information that will help us replicate the problem. https://grafana.com/docs/grafana/latest/administration/provisioning/#example-data-source-config-file. Thanks for contributing an answer to Stack Overflow! Reference to what I'm talking about on the Grafana docs: Solution is given at #11018 by @torkelo (wish it had been properly documented at the original provisioning docu and in export/import) - Well occasionally send you account related emails. The panels that are using the datasource should be updated to reflect the new name while the variable on the dashboard is left with the old name. privacy statement. Restart Grafana to provision the new dashboard or wait 10 seconds for Grafana to automatically create the dashboard. Templating error after exporting to Grafana 4.3.3, http://docs.grafana.org/reference/export_import/. In fact, you need to use the service_name:port structure. Find the UID that Grafana assigned to the datasource in the JSON. Making statements based on opinion; back them up with references or personal experience. Find the UID that Grafana assigned to the datasource in the JSON. wizzy export dashboards Add Data Source from grafana, got HTTP Error Bad Gateway error: Import dashboard 315 from: https://grafana.com/dashboards/315 Then check Kubernetes cluster monitoring (via Prometheus), got Templating init failed error: Why? After that, I've updated the Grafana instance to 8.4.6: (un)Fortunately, all seems to be working fine. Should be straight-forward, right?, but then you bring your Dashboard.json to a new Grafana instance only to find the data didn't load. ServiceMonitor to scrape metrics - you must add ti on your own. Not the answer you're looking for? How to notate a grace note at the start of a bar with lilypond? Upgrade to 8.3.3 (version we upgraded to), without opening the dashboard (this might be part of the issue based on the newly noticed message but it is also not a viable workaround if there are a large number of dashboards), rename the datasource. "Dashboards used in provision need to raw dashboard json , not export for share dashboards. , pannelexport, After that , we have created a new datasource Y (influxdb database Y) and change X by Y in all panels What is the purpose of this D-shaped ring at the base of the tongue on my hiking boots? I did try renaming the datasource again after manually updating some of the dashboards and those variable names did update this time. Variables in provisioned dashboard json file? Because of it, remember to specify the orgId option accordingly for your data sources if needed. Asking for help, clarification, or responding to other answers. Below you can see the grafana directory containing files that I added to my project to supply Grafana configuration: According to my docker compose configuration the prometheus service is available for the other services running within the internal network under prometheus:9090 (http://localhost:9090/ in my browser). Then you need to look in dashboard -> settings -> versions and look for a version before the upgrade. I used a slight variation of @raul1991 answer, which includes the 'datasource' key; We are running 8.4.6 and this is still an issue. Dashboard variables' datasource not updated when renaming data source, https://grafana.com/docs/grafana/latest/http_api/dashboard_versions/#get-dashboard-version, https://user-images.githubusercontent.com/562238/149457650-9d7f1558-50bc-4879-ad1b-670cdf2c1ca2.png, Grafana version: 8.3.3 (when rename occurred), Data source type & version: Influx v1.8.3, User OS & Browser: MacOS 11.5.1 w/ Chrome 96.0.4664.55, Query results from the inspect drawer (data tab & query inspector), Panel settings can be extracted in the panel inspect drawer JSON tab, Dashboard JSON can be found in the dashboard settings JSON model view. We're trying to copy the json from our prod Grafana to our non-prod Grafana, and it shows the following errors. For me, there wasn't even an error or log which was frustrating. This is mainly a test of hdfs + nn + zk + jn in k8s: Upload an updated version of an exported dashboard.json file from Grafana. Can I save somewhere dashboards for now, so that they showed up in dashboards tab in data sources like official? Check what is the datasource for the dashboard template variables. I mean we should be able to copy output json with dashboard data and paste it while importing, receiving exactly the same dashboard without some annoying warnings. The same issue also occurs with Grafana v8.5.2 and the Grafana-Operator. All in all, the issue occurs only when working with files downloaded from the Official and community dashboard page. What is the purpose of non-series Shimano components? I've tried to reproduce the issue with the following steps. Did this satellite streak past the Hubble Space Telescope so close that it was out of focus? The URL needs to be accessible from the grafana backend/server if you select this access mode.Browser access mode:All requests will be made from the browser directly to the data source and may be subject to Cross-Origin Resource Sharing (CORS) requirements. Any leads on this would be highly appreciated! Do new devs get fired if they can't solve a certain bug? *"},"inspect":{"type":"graphite"},"retry":0,"headers":{"Accept":"application/json, text/plain, */*"}},"statusText":"","xhrStatus":"error"},"cancelled":true}. rev2023.3.3.43278. To avoid having your issue closed in the future, please read our CONTRIBUTING guidelines. We have made a dashboard, with graphs which was using a datasource named X (influxdb database X) . Have a question about this project? When they're exported using the API, the datasource name is hardcoded to whatever it was set in this particular instance; when exported using the UI the DS_* templating is added. You made a cool dashboard, then clicked "Share" and exported to JSON. I know that's not much information and I would be glad to provide any additional info that might help resolving this issue. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. This will allow you to Export/Import dashboards between container tear downs, keeping your teammates happy. Therefore, to display metrics gathered on my Spring Boot project, I'm going to use the Dashboard for Micrometer instrumented applications (Java, Spring Boot, Micronaut)" i. e. the JVM dashboard.. Add the configuration to the project Grafana v7.5.3 (3e3cf4d) I think some of these issues might be resolved by #43263 but would like to confirm it. Required fields are marked *, By using this form you agree with the storage and handling of your data by this website. @vlatk0o that's the one I was using too. It would be good to get a fix, or at least an official workaround. Thanks to the Grafana provisioning feature, we can use configuration files to set up everything before running the application for the first time. In short, add uid: to your datasource provisioning yaml: This will force Grafana to output all exported dashboards with the uid "myotheruidisanairplane". With the datasource UID undefined, the graph should now load up as expected. After that , we have created a new datasource Y (influxdb database Y) and change X by Y in all panels. Linux client 3.10.0-957 Grafana throws 'Templating init failed' error after upgrade when using graphite backend, How Intuit democratizes AI development across teams through reusability. Then I exported it to .json file and added, with changed name, to 'provisioning/dashboards' directory. Making statements based on opinion; back them up with references or personal experience. When loading the dashboard we get the "templating" error with "Error updating options: datasource was not found". Therefore, some data may be missing from the view over time: In addition to creating a custom dashboard, you can try to find a newer community dashboard: As a result, you will have a more up-to-date dashboard configuration that wont skip data: Thanks for this document, help me a lot to understood how deploy datasources and dashboards in my case from puppet! To subscribe to this RSS feed, copy and paste this URL into your RSS reader. How to use Slater Type Orbitals as a basis functions in matrix method correctly? If you run services in Docker, you need to pay attention to the network configuration. where key is '' and thus the error appears as Datasource was not found (whitespace is collapsed by the web browser). i have exported the dashboard to json to see old datasource references, but there is nothing. "pluginName": "Graphite" The dashboard JSON is as follows: docker stop grafana docker rm grafana docker run -d -p 3001:3000 --name=grafana -v grafana-storage:/var/lib/grafana grafana/grafana:8.4.6 ).Best regards,Dan, Your email address will not be published. rev2023.3.3.43278. Euler: A baby on his lap, a cat on his back thats how he wrote his immortal works (origin? I turned off the firewall on appliance, post that adding http://prometheus:9090 on URL did not throw bad gateway error. Grafana throws 'Templating init failed' error after upgrade when using graphite backend Ask Question Asked 5 years, 6 months ago Modified 3 years, 5 months ago Viewed 3k times 6 I'm trying to upgrade my Grafana setup from version v4.0.2 (commit: v4.0.2) to version v4.4.3 (commit: 54c79c5) on CentOS 7. PBFA97CFB590B2093 or it'll be the variable form $ {DS_PROMETHEUS}, which is used when telling Grafana to "Share Externally". Staging Ground Beta 1 Recap, and Reviewers needed for Beta 2, How to show custom application metrics in Prometheus captured using the golang client library from all pods running in Kubernetes, How can I open the Jaeger UI(run in Istio) in a remote browser, not the localhost machine, Prometheus not scraping additional scrapes, Grafana dashboard not displaying pod name instead pod_name, deploy elk stack in kubernetes with helm VolumeBinding error, Unable To Access Prometheus Dashboard/ Port Forwarding Doesn't Work, Cant see Prometheus server on localhost:9090, Bulk update symbol size units from mm to map units in rule-based symbology, Follow Up: struct sockaddr storage initialization by network format-string.