Summary
The AIO sample dashboard imported by the observability component renders all panels empty with the error:
Datasource ${DS_MANAGED_PROMETHEUS_INSTANCE} was not found
Details
src/000-cloud/020-observability/scripts/import-grafana-dashboards.sh imports the AIO sample dashboard directly from the upstream source:
https://raw.githubusercontent.com/Azure/azure-iot-operations/refs/heads/main/samples/grafana-dashboard/aio.sample.json
That dashboard is a Grafana export: every panel (and the cluster template variable) references its datasource through the __inputs placeholder "uid": "${DS_MANAGED_PROMETHEUS_INSTANCE}".
az grafana dashboard import only auto-binds a datasource __input when a matching Prometheus datasource is Grafana's default. In Azure Managed Grafana the auto-provisioned managed Prometheus datasource (from the Azure Monitor Workspace integration) is not the default, so the placeholder is imported literally and no panel can resolve its datasource.
Upstream change that surfaced this
The behavior tracks the 2510-release refresh of the sample dashboard in the source repo: Azure/azure-iot-operations#80. That update:
- renamed the datasource plugin input to
Microsoft Prometheus (Preview), and
- reset the
prometheus datasource template variable's current to {} (previously it shipped pre-bound), while panels still hardcode the raw ${DS_MANAGED_PROMETHEUS_INSTANCE} input rather than the ${prometheus} variable.
Impact
Fresh deployments of src/000-cloud/020-observability get an AIO sample dashboard with no data until the datasource is bound manually.
Fix
In the import script, resolve the managed Prometheus datasource uid (by Azure Monitor Workspace name, falling back to the first prometheus-type datasource) and bind every ${DS_MANAGED_PROMETHEUS_INSTANCE} reference before importing (and drop __inputs). Pass the monitor workspace name from Terraform so the correct datasource is selected.
Repro
- Deploy the observability component so the AIO sample dashboard is imported.
- Open AIO Sample Dashboard in Azure Managed Grafana.
- Observe the
Datasource ${DS_MANAGED_PROMETHEUS_INSTANCE} was not found error and empty panels.
Summary
The AIO sample dashboard imported by the observability component renders all panels empty with the error:
Details
src/000-cloud/020-observability/scripts/import-grafana-dashboards.shimports the AIO sample dashboard directly from the upstream source:https://raw.githubusercontent.com/Azure/azure-iot-operations/refs/heads/main/samples/grafana-dashboard/aio.sample.jsonThat dashboard is a Grafana export: every panel (and the
clustertemplate variable) references its datasource through the__inputsplaceholder"uid": "${DS_MANAGED_PROMETHEUS_INSTANCE}".az grafana dashboard importonly auto-binds a datasource__inputwhen a matching Prometheus datasource is Grafana's default. In Azure Managed Grafana the auto-provisioned managed Prometheus datasource (from the Azure Monitor Workspace integration) is not the default, so the placeholder is imported literally and no panel can resolve its datasource.Upstream change that surfaced this
The behavior tracks the 2510-release refresh of the sample dashboard in the source repo: Azure/azure-iot-operations#80. That update:
Microsoft Prometheus (Preview), andprometheusdatasource template variable'scurrentto{}(previously it shipped pre-bound), while panels still hardcode the raw${DS_MANAGED_PROMETHEUS_INSTANCE}input rather than the${prometheus}variable.Impact
Fresh deployments of
src/000-cloud/020-observabilityget an AIO sample dashboard with no data until the datasource is bound manually.Fix
In the import script, resolve the managed Prometheus datasource uid (by Azure Monitor Workspace name, falling back to the first
prometheus-type datasource) and bind every${DS_MANAGED_PROMETHEUS_INSTANCE}reference before importing (and drop__inputs). Pass the monitor workspace name from Terraform so the correct datasource is selected.Repro
Datasource ${DS_MANAGED_PROMETHEUS_INSTANCE} was not founderror and empty panels.