grafana templating init failed datasource named was not found

], It seems very similar to this issue in Grafana 4.0: #6189. Already on GitHub? grafanadashboarduserdatasourcedashboardgrafanagrafana-5.4.4 json model . I don't know about the Prometheus Helm-chart, but assuming there is a. https://grafana.com/docs/grafana/latest/http_api/dashboard_versions/#get-dashboard-version, This should give you the dashboard json before the upgrade. 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. ).Best regards,Dan, Your email address will not be published. We can re-open it after you you add more information. We are trying to render grafana snapshot using an iframe for a dasboard which we are developing. Will see what I can find and add them here. Running Grafana 4.3.3 and I used wizzy to download dashboard 1471 version 1 I did not dig far enough into #33817 , #41232 , or #43263 but believe this may have been partially addressed by those. prometheus9090node_exporter9100mysqld_exporter9104 When loading the dashboard we get the "templating" error with "Error updating options: datasource was not found". I had the same problem, I didn't know where to get the uid of my data source, so I had to review the request that grafana made to see what information it brought when listing the data sources and I found the valuable UID. To avoid having your issue closed in the future, please read our CONTRIBUTING guidelines. message on all dashboards (ss below). "pluginName": "Graphite" Consequently, we need to create the dashboard.yml file in the same folder to make Grafana use our JVM dashboard config: Below youll find a short description of used options: In the dashboard.yml file we specified the /etc/grafana/provisioning/dashboards as the path used by our Default provider. First, download the JSON file using the link provided on the dashboard page: Next, save the file in the grafana/provisioning/dashboards/ directory. You made a cool dashboard, then clicked "Share" and exported to JSON. Provisioning a predefined Grafana dashboard. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. In your text editor do a find and replace. If you run services in Docker, you need to pay attention to the network configuration. Because of it, remember to specify the orgId option accordingly for your data sources if needed. prometheus v2.17.2 via prometheus-operator, grafana v6.7.3 (a04ef6cefc) with prometheus as Data Source, Hadoop 3.1.3 in HA setup ( zookeeper cluster + 3 journalnodes + 3 namenodes, which means 1 active nn and 2 standby). It will be great if I can change those inputs later or import as dashboard template and later import them with correct input in the app. - the incident has nothing to do with me; can I use this this way? When I'm trying to open any dashboard that I have I'm getting a following error message: Also in the browser console log I see the following messages: I'm getting the same error in browser console when I'm trying to Save & Test settings in Graphite datasource. We are trying to render grafana snapshot using an iframe for a dasboard which we are developing. But - @jsoref - do you still have dashboard JSON from before the migration? Find the UID that Grafana assigned to the datasource in the JSON. Dashboard imported without filling template variables and when access those dashboards I see error. 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! Failed to upgrade legacy queries Datasource named $ {DS_PROMETHEUS} was not found and Error updating options: Datasource named $ {DS_PROMETHEUS} was not found I am quite new to Grafana and I haven't been able to find the documentation describing such a situation. How to notate a grace note at the start of a bar with lilypond? Used with Prometheus Hadoop HDFS FSImage Exporter in kubernetes, Initial dashboard for hadoop in kubernetes (wait what?). In fact, you need to use the service_name:port structure. What video game is Charlie playing in Poker Face S01E07? "__inputs": [ However when I manually go to the Grafana gui and do the import everything functions correctly. Ideally, when renaming a datasource, the variables associated with the dashboard would also be updated. Restart Grafana to provision the new dashboard or wait 10 seconds for Grafana to automatically create the dashboard. docker ps To connect the prometheus to GRAFANA, you will need to get the prometheus server IP address that is running as a docker image from host. Then you need to look in dashboard -> settings -> versions and look for a version before the upgrade. For me, there wasn't even an error or log which was frustrating. Thanks for contributing an answer to Stack Overflow! Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide. Otus-DevOps-2017-11/Maksov_microservices#9, Otus-DevOps-2018-02/EugRomanchenko_microservices#10. I expected to import those dashboards with default value from inputs and fill template variables, What happened instead? In short, add uid: to your datasource provisioning yaml: This will force Grafana to output all exported dashboards with the uid "myotheruidisanairplane". privacy statement. Well occasionally send you account related emails. Your email address will not be published. Hi, In the sidebar, hover the cursor over Dashboards (squares) icon, and then click Manage. We are able to generate the snapshot for a given panel using snapshotapi and while rendering the snapshot url in an iframe, we are getting "Template init failed Datasource named "x" was not found. i thought too but in fact in variable definition no datasource was set , i have just understood that if no one is selected the default one is used which is the bad one, Powered by Discourse, best viewed with JavaScript enabled, Old datasource referenced: templating init failed datasource named XX not found. Templating error after exporting to Grafana 4.3.3, http://docs.grafana.org/reference/export_import/. 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. To learn more, see our tips on writing great answers. Well occasionally send you account related emails. I installed Grafana and Prometheus using helm charts. Or you might have gone to Dashboard settings and selected "View as JSON" then copy-and-pasta'ed that json into a dashboard made through provisioning. 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? The error I'm getting in the logs is lvl=eror msg="Request Completed" method=POST path=/api/ds/query status=500. Required fields are marked *, By using this form you agree with the storage and handling of your data by this website. privacy statement. What sort of strategies would a medieval military use against a fantasy giant? This might not be a wizzy problem at all, actually -- I am not using wizzy but stumbled across this issue debugging the same symptoms. After that , we have created a new datasource Y (influxdb database Y) and change X by Y in all panels. So this dashboard is one that we did not do any manual intervention on and has two variables. Thanks to that, you can easily test the setup on your local machine. Why do academics stay as adjuncts for years rather than move around? At the moment of writing this post the issue seems to be still open. Replacing all instances of ${DS_PROMETHEUS} in the dashboard's json with just Prometheus directly worked around the issue. Support dashboard variables in dashboard provisioning, https://github.com/grafana/grafana/blob/master/public/app/plugins/datasource/graphite/plugin.json#L7, Grafana 5 datasource for variables/templating/panels are not assigned, [Feature request] Add dashboard import by environment variable, Failing automatic provisioning of Grafana Dashboards previously exported or coming from grafana.com, fix: datasource not found in dashboard provisioning, nixos/grafana: Allow setting UID for datasource, No automatic import of Grafana dashboards, Incorrect variable when importing Dashboard, https://grafana.com/docs/grafana/latest/administration/provisioning/#example-data-source-config-file, Grafana dashboard maintenance/authoring (epic), Add hard coded job name to work with dashboard provisioning, Add dashboard variables to customize beacon/validator job name, Add dashboard variables to customize beacon/validator job name (, Failed to upgrade legacy queries Datasource ${DS_PROMETHEUS} was not found. prometheusmysqlmysqlagentmysqld_exporter If you run an older version of Grafana and want to share a dashboard on Grafana.com you need to manually add the inputs and templatize the datasource properties like above. Linear regulator thermal information missing in datasheet. "type": "datasource", wizzy export dashboards It is now read-only. Namely, under the /etc/grafana/provisioning/datasources directory. And as you redeploy Grafana, it'll always name your Prometheus instance "myotheruidisanairplane", thus not breaking importing your exported dashboards. Then I exported it to .json file and added, with changed name, to 'provisioning/dashboards' directory. Euler: A baby on his lap, a cat on his back thats how he wrote his immortal works (origin? image](https://user-images.githubusercontent.com/562238/149457650-9d7f1558-50bc-4879-ad1b-670cdf2c1ca2.png). Therefore, to display metrics gathered on my Spring Boot project, Im going to use the Dashboard for Micrometer instrumented applications (Java, Spring Boot, Micronaut) i. e. the JVM dashboard. Sorry, an error occurred. Find centralized, trusted content and collaborate around the technologies you use most. Why are Suriname, Belize, and Guinea-Bissau classified as "Small Island Developing States"? I don't think I have a copy handy. Add data sourcePrometheus. Thanks for contributing an answer to Stack Overflow! How to set up Grafana with Docker and connect it to Prometheus, https://github.com/grafana/grafana/pull/11531, Support dashboard variables in dashboard provisioning. The Grafana board uses one Postgres source for production and another for non-prod. wizzy download from-gnet dashboard 1471 1 By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. Follow the workaround, and find-and-replace all UIDs to be a null-string. 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. How to do a distinct count of a metric using graphite datasource in grafana? Thanks to the Grafana provisioning feature, we can use configuration files to set up everything before running the application for the first time. In exported .json file I have properly defined DS_GRAPHITE variable and I wonder why I have such output? Any leads on this would be highly appreciated! Check what is the datasource for the dashboard template variables. I've just tried to apply the workaround mentioned in #11018 but stumbled upon the same issue mentioned in #11018 (comment) - the 'View JSON' export sets the id value to a number which causes Grafana to reject this dashboard when provisioning - it needs to be null (which is set when exporting the dashboard to a file). Is there a single-word adjective for "having exceptionally strong moral principles"? The graph panels were updated to use the renamed datasource however dashboard variables were not updated and require manual intervention to fix. Lately, I was configuring provisioning in Grafana 8+ and got the following error: I had to edit the datasource.yml file to get the data source url to contain the appropriate protocol (http in my case): As a result, the url that I got in the Grafana Data Source configuration looks like in the screenshot below: The community dashboards arent always up to date with the Micrometer and Spring releases. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. e.g. Recovering from a blunder I made while emailing a professor. Using Kolmogorov complexity to measure difficulty of problems? Connect and share knowledge within a single location that is structured and easy to search. 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.