-
What Grafana version and what operating system are you using?
Grafana Docker => Version 11.5.1 -
What are you trying to achieve?
Get a public dashboard in my django app using grafana and prometheus / node exporter to get data -
How are you trying to achieve it?
With docker and api request on Grafana. I get a public dashboard via api request and try to display it on my html page -
What happened?
Dashboard fail displaying because of an error 500. My dashboard is displaying correctly in my grafana interface but when i want to display it using public dashboard and grafana api it fail displaying -
What did you expect to happen?
Display my public dashboard -
Can you copy/paste the configuration(s) that you are having problems with?
prometheus:
image: prom/prometheus
container_name: prometheus
depends_on:
- django-web
volumes:
- "./docker/prometheus/volume:/etc/prometheus"
- "prometheus-data:/prometheus"
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.retention.time=15d'
- '--storage.tsdb.path=/prometheus'
networks:
- Tnetwork
ports:
- 9090:9090
restart: always
node-exporter:
image: prom/node-exporter
depends_on:
prometheus:
condition: service_started
networks:
- Tnetwork
ports:
- 9101:9100
restart: unless-stopped
grafana:
build: ./docker/grafana
container_name: grafana
depends_on:
prometheus:
condition: service_started
env_file:
- .env
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
- GF_SECURITY_X_CONTENT_TYPE_OPTIONS=false
- GF_SECURITY_ALLOW_EMBEDDING=true
- GF_PUBLIC_DASHBOARD_ENABLED=true
- GF_FEATURE_TOGGLES_ENABLE=publicDashboards
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
- ./docker/grafana/volumes/provisioning:/etc/grafana/provisioning
networks:
- Tnetwork
restart: unless-stopped
-
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
I have errors on my web page in the current image. And I have errors in my logs:
grafana | logger=datasources t=2025-03-18T13:47:56.504245815Z level=warn msg=“Invalid datasource uid. A valid uid is a combination of a-z, A-Z, 0-9 (alphanumeric), - (dash) and _ (underscore) characters, maximum length 40. Invalid characters will be replaced by dashes.” uid=${datasource} action=read name= error=“invalid UID”
grafana | logger=publicdashboards.service t=2025-03-18T13:47:56.504454393Z level=error msg=“Error querying datasources for public dashboard” error=“data source not found” datasources=[prometheus]
grafana | logger=context userId=1 orgId=1 uname=admin t=2025-03-18T13:47:56.504496794Z level=error msg=“Request Completed” method=POST path=/api/public/dashboards/beaf0dbb95d14423923d0b76e7cbe0ab/panels/78/query status=500 remote_addr=172.18.0.1 time_ms=4 duration=4.28432ms size=35 referer=“http://localhost:3000/public-dashboards/beaf0dbb95d14423923d0b76e7cbe0ab?orgId=1&var-datasource=default&var-diskdevices=[a-z]%2B|nvme[0-9]%2Bn[0-9]%2B|mmcblk[0-9]%2B&var-job=&var-node=” handler=/api/public/dashboards/:accessToken/panels/:panelId/query status_source=server error=“unexpected error type [*errors.errorString]: data source not found” -
Did you follow any online instructions? If so, what is the URL?
i am deploying my locally for the moment