Skip to content

Fix: static datasource ids#3

Open
0hlov3 wants to merge 2 commits into
dhruviemehta:mainfrom
0hlov3:fix/staticDatasourceIDs
Open

Fix: static datasource ids#3
0hlov3 wants to merge 2 commits into
dhruviemehta:mainfrom
0hlov3:fix/staticDatasourceIDs

Conversation

@0hlov3
Copy link
Copy Markdown

@0hlov3 0hlov3 commented Sep 14, 2025

Remove hardcoded Prometheus datasource UIDs from dashboard JSON

Why

The dashboard JSON currently hardcodes Prometheus datasource uid/id values. These values differ between Grafana instances and orgs, which often causes an “unknown datasource uid” / “data source not found” error during import. When a user has only one Prometheus datasource (or a default Prometheus datasource set), Grafana can resolve it automatically during import, as long as the dashboard doesn’t pin a specific UID.

What changed

  • Removed static Prometheus datasource uid/id bindings from all panels/queries.
  • Kept the datasource type as Prometheus so Grafana can auto-select the only/default Prometheus datasource at import time.
  • No query logic or panel configuration was changed.

This fixes a Problem, that the id of the Datasource is unknown, when
importing the Dashboard
Changelog: fixed
Comment thread resource-optimization-dashboard.json Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants