Reputation: 81
I am trying to use Grafana public Dashboards. First some infos:
Grafana Version Grafana v10.1.5 (849c612fcb) running in a Docker container
InfluxDB as data source (its a remote data source running on another server)
I created a simple dashboard, no template variables, no complex queries. While logged in, the dashboard works as expected.
I made the dashboard public using the functionality described here: https://grafana.com/docs/grafana/latest/dashboards/dashboard-public/
When loading the dashboard, all 3 requests to the data source fail. The developer console shows "500 internal server error"s.
the server logs have some more info:
logger=publicdashboards.service t=2023-10-17T11:08:39.17688086Z level=error msg="Error querying datasources for public dashboard" error="data source not found" datasources=[influxdb]
logger=context userId=1 orgId=1 uname=admin t=2023-10-17T11:08:39.17693254Z level=error msg= error="unexpected error type [*errors.errorString]: data source not found" remote_addr=213.182.3.4 traceID=
logger=context userId=1 orgId=1 uname=admin t=2023-10-17T11:08:39.17697267Z level=error msg="Request Completed" method=POST path=/api/public/dashboards/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/panels/2/query status=500 remote_addr=xxx.xxx.xxx.xxx time_ms=1 duration=1.949332ms size=48 referer=https://fuerstenschulepublic.cs.egrid.de/public-dashboards/7b648abef11d43b9974baf863a772c06?orgId=1&refresh=10s
As of now, I have no idea where to further debug this problem. Do you have any ideas what the issue could be?
Thanks & best regards
Philipp
Upvotes: 1
Views: 1982
Reputation: 3542
I just hit this same error. It was caused by the datasource uids having the wrong case. It seemed like the datasource uid is case insensitive for private, but sensitive for public.
Upvotes: 0
Reputation: 117
If you copy-pasted from another Grafana Server the problem could be the id of the datasource. This is the part of json causing the issue:
"datasource": {
"type": "influxdb",
"uid": "xxxxxxxxxxxxxx"
}
How to solve:
Upvotes: 1
Reputation: 81
I found the source of the problem: I copy pasted the Dashboard definition from another Grafana Instance. I re-created the Dashboard on the new Instance and it works :) I did not check yet which part of the dashboard JSON causes the issue. If I find it, I will post it here. –
Upvotes: 0