grafana-dashboard-datasource-uid-mismatch

Diagnose and fix Grafana dashboard datasource UID mismatches in JSON and provisioning YAML.

Updated Nov 18, 2025
One-click install
npx skills add https://github.com/cajias/claude-skills --skill grafana-dashboard-datasource-uid-mismatch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: grafana-dashboard-datasource-uid-mismatch
Source: https://github.com/cajias/claude-skills/tree/main/plugins/integrations/skills/grafana-dashboard-datasource-uid-mismatch
Command: npx skills add https://github.com/cajias/claude-skills --skill grafana-dashboard-datasource-uid-mismatch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps diagnose and fix Grafana dashboards that show "No data" even when the underlying datasource and query are working correctly.

Core Features & Use Cases

  • Datasource UID Diagnosis: Compare the UID embedded in dashboard JSON with the UID Grafana actually assigned.
  • Provisioning Fixes: Repair Docker-provisioned Grafana setups where dashboards break after volume resets or datasource re-provisioning.
  • Silent Failure Troubleshooting: Resolve cases where panels render empty because datasource references no longer match.
  • Use Case: A fresh Grafana deployment loads a dashboard with empty panels, and this Skill guides you to pin the datasource UID and re-provision safely so the dashboard binds again.

Quick Start

Ask the assistant to inspect your Grafana dashboard and datasource provisioning files, confirm whether the datasource UID matches the dashboard JSON, and recommend the exact fix if they differ.

Frequently Asked Questions about grafana-dashboard-datasource-uid-mismatch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my Grafana dashboard show no data after importing JSON?

Grafana dashboards show no data after importing JSON when the datasource UID embedded in the dashboard file does not match the UID Grafana actually assigned. This UID mismatch causes silent binding failures where panels render empty despite correct underlying Prometheus queries.

How do I fix Grafana panels with no data caused by datasource UID mismatch?

Fix Grafana panels with no data by inspecting the dashboard JSON datasource references and comparing them against the provisioning YAML UID settings. Pin the correct datasource UID and re-provision safely to ensure the dashboard binds to the Prometheus datasource again.

How does Grafana provisioning YAML handle immutable datasource records and deleteDatasources?

Grafana provisioning YAML handles immutable datasource records by requiring explicit deleteDatasources entries to remove old bindings before applying new UIDs. This prevents silent failures where panels render empty because datasource references no longer match the newly provisioned records.

Can I use this to troubleshoot Docker-provisioned Grafana stacks after a volume reset?

Yes, you can troubleshoot Docker-provisioned Grafana stacks after a volume reset by diagnosing whether the datasource UID changed during re-provisioning. This applies to fresh Grafana volumes where dashboards break because embedded JSON datasource references no longer match the newly assigned UIDs.

What is the best way to pin a Prometheus datasource UID in Grafana dashboard JSON?

The best way to pin a Prometheus datasource UID in Grafana dashboard JSON is to explicitly define the UID in your provisioning YAML configuration. This ensures the datasource receives a fixed identifier instead of an auto-generated one, preventing dashboard binding failures across Docker re-provisioning.