[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7372VRRF49H09D0WCY58MWQ":3,"skill-same:01M7372VRRF49H09D0WCY58MWQ":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M7372VRRF49H09D0WCY58MWQ","build-grafana-dashboards",null,"Create production-ready Grafana dashboards with reusable panels, template variables, annotations, and provisioning for version-controlled dashboard deployment. Use when creating visual representations of Prometheus, Loki, or other data source metrics, building operational dashboards for SRE teams, migrating from manual dashboard creation to version-controlled provisioning, or establishing executive-level SLO compliance reporting.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fbuild-grafana-dashboards\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: build-grafana-dashboards\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\ndescription: >\n  Create production-ready Grafana dashboards with reusable panels, template variables,\n  annotations, and provisioning for version-controlled dashboard deployment. Use when\n  creating visual representations of Prometheus, Loki, or other data source metrics,\n  building operational dashboards for SRE teams, migrating from manual dashboard creation\n  to version-controlled provisioning, or establishing executive-level SLO compliance\n  reporting.\nlicense: MIT\nallowed-tools: Read Write Edit Bash Grep Glob\nmetadata:\n  author: Philipp Thoss\n  version: \"1.0\"\n  domain: observability\n  complexity: intermediate\n  language: multi\n  tags: grafana, dashboards, visualization, panels, provisioning\n---\n\n# Build Grafana Dashboards\n\nDesign and deploy Grafana dashboards with best practices for maintainability, reusability, and version control.\n\n## When to Use\n\n- Creating visual representations of Prometheus, Loki, or other data source metrics\n- Building operational dashboards for SRE teams and incident responders\n- Establishing executive-level reporting dashboards for SLO compliance\n- Migrating dashboards from manual creation to version-controlled provisioning\n- Standardizing dashboard layouts across teams with template variables\n- Creating drill-down experiences from high-level overviews to detailed metrics\n\n## Inputs\n\n- **Required**: Data source configuration (Prometheus, Loki, Tempo, etc.)\n- **Required**: Metrics or logs to visualize with their query patterns\n- **Optional**: Template variables for multi-service or multi-environment views\n- **Optional**: Existing dashboard JSON for migration or modification\n- **Optional**: Annotation queries for event correlation (deployments, incidents)\n\n## Procedure\n\n> See [Extended Examples](references\u002FEXAMPLES.md) for complete configuration files and templates.\n\n\n### Step 1: Design Dashboard Structure\n\nPlan dashboard layout and organization before building panels.\n\nCreate a dashboard specification document:\n\n```markdown\n# Service Overview Dashboard\n\n## Purpose\nReal-time operational view for on-call engineers monitoring the API service.\n\n## Rows\n1. High-Level Metrics (collapsed by default)\n   - Request rate, error rate, latency (RED metrics)\n   - Service uptime, instance count\n2. Detailed Metrics (expanded by default)\n   - Per-endpoint latency breakdown\n   - Error rate by status code\n   - Database connection pool status\n3. Resource Utilization\n   - CPU, memory, disk usage per instance\n   - Network I\u002FO rates\n4. Logs (collapsed by default)\n   - Recent errors from Loki\n   - Alert firing history\n\n## Variables\n- `environment`: production, staging, development\n- `instance`: all instances or specific instance selection\n- `interval`: aggregation window (5m, 15m, 1h)\n\n## Annotations\n- Deployment events from CI\u002FCD system\n- Alert firing\u002Fresolving events\n```\n\nKey design principles:\n- **Most important metrics first**: Critical metrics at the top, details below\n- **Consistent time ranges**: Synchronize time across all panels\n- **Drill-down paths**: Link from high-level to detailed dashboards\n- **Responsive layout**: Use rows and panel widths that work on various screens\n\n**Got:** Clear dashboard structure documented, stakeholders aligned on metrics and layout priorities.\n\n**If fail:**\n- Conduct dashboard design review with end users (SREs, developers)\n- Benchmark against industry standards (USE method, RED method, Four Golden Signals)\n- Review existing dashboards in team for consistency patterns\n\n### Step 2: Create Dashboard with Template Variables\n\nBuild the dashboard foundation with reusable variables for filtering.\n\nCreate dashboard JSON structure (or use UI, then export):\n\n```json\n{\n  \"dashboard\": {\n    \"title\": \"API Service Overview\",\n    \"uid\": \"api-service-overview\",\n    \"version\": 1,\n    \"timezone\": \"browser\",\n    \"editable\": true,\n    \"graphTooltip\": 1,\n    \"time\": {\n      \"from\": \"now-6h\",\n      \"to\": \"now\"\n    },\n    \"refresh\": \"30s\",\n    \"templating\": {\n      \"list\": [\n        {\n          \"name\": \"environment\",\n          \"type\": \"query\",\n          \"datasource\": \"Prometheus\",\n          \"query\": \"label_values(up{job=\\\"api-service\\\"}, environment)\",\n          \"multi\": false,\n          \"includeAll\": false,\n          \"refresh\": 1,\n          \"sort\": 1,\n          \"current\": {\n            \"selected\": false,\n            \"text\": \"production\",\n            \"value\": \"production\"\n          }\n        },\n        {\n          \"name\": \"instance\",\n          \"type\": \"query\",\n          \"datasource\": \"Prometheus\",\n          \"query\": \"label_values(up{job=\\\"api-service\\\",environment=\\\"$environment\\\"}, instance)\",\n          \"multi\": true,\n          \"includeAll\": true,\n          \"refresh\": 1,\n          \"allValue\": \".*\",\n          \"current\": {\n            \"selected\": true,\n            \"text\": \"All\",\n            \"value\": \"$__all\"\n          }\n        },\n        {\n          \"name\": \"interval\",\n          \"type\": \"interval\",\n          \"options\": [\n            {\"text\": \"1m\", \"value\": \"1m\"},\n            {\"text\": \"5m\", \"value\": \"5m\"},\n            {\"text\": \"15m\", \"value\": \"15m\"},\n            {\"text\": \"1h\", \"value\": \"1h\"}\n          ],\n          \"current\": {\n            \"text\": \"5m\",\n            \"value\": \"5m\"\n          },\n          \"auto\": false\n        }\n      ]\n    },\n    \"annotations\": {\n      \"list\": [\n        {\n          \"name\": \"Deployments\",\n          \"datasource\": \"Prometheus\",\n          \"enable\": true,\n          \"expr\": \"changes(app_version{job=\\\"api-service\\\",environment=\\\"$environment\\\"}[5m]) > 0\",\n          \"step\": \"60s\",\n          \"iconColor\": \"rgba(0, 211, 255, 1)\",\n          \"tagKeys\": \"version\"\n        }\n      ]\n    }\n  }\n}\n```\n\nVariable types and use cases:\n- **Query variables**: Dynamic lists from data source (`label_values()`, `query_result()`)\n- **Interval variables**: Aggregation windows for queries\n- **Custom variables**: Static lists for non-metric selections\n- **Constant variables**: Shared values across panels (data source names, thresholds)\n- **Text box variables**: Free-form input for filtering\n\n**Got:** Variables populate correctly from data source, cascading filters work (environment filters instances), default selections appropriate.\n\n**If fail:**\n- Test variable queries independently in Prometheus UI\n- Check for circular dependencies (variable A depends on B depends on A)\n- Verify regex patterns in `allValue` field for multi-select variables\n- Review variable refresh settings (on dashboard load vs on time range change)\n\n### Step 3: Build Visualization Panels\n\nCreate panels for each metric with appropriate visualization types.\n\n**Time series panel** (request rate):\n\n```json\n{\n  \"type\": \"timeseries\",\n  \"title\": \"Request Rate\",\n  \"gridPos\": {\"h\": 8, \"w\": 12, \"x\": 0, \"y\": 0},\n  \"targets\": [\n    {\n      \"expr\": \"sum(rate(http_requests_total{job=\\\"api-service\\\",environment=\\\"$environment\\\",instance=~\\\"$instance\\\"}[$interval])) by (method)\",\n      \"legendFormat\": \"{{method}}\",\n      \"refId\": \"A\"\n    }\n  ],\n  \"fieldConfig\": {\n    \"defaults\": {\n      \"unit\": \"reqps\",\n      \"color\": {\n        \"mode\": \"palette-classic\"\n      },\n      \"custom\": {\n        \"drawStyle\": \"line\",\n        \"lineInterpolation\": \"smooth\",\n        \"fillOpacity\": 10,\n        \"spanNulls\": true\n      },\n      \"thresholds\": {\n        \"mode\": \"absolute\",\n        \"steps\": [\n          {\"value\": null, \"color\": \"green\"},\n          {\"value\": 1000, \"color\": \"yellow\"},\n          {\"value\": 5000, \"color\": \"red\"}\n        ]\n      }\n    }\n  },\n  \"options\": {\n    \"tooltip\": {\n      \"mode\": \"multi\",\n      \"sort\": \"desc\"\n    },\n    \"legend\": {\n      \"displayMode\": \"table\",\n      \"placement\": \"right\",\n      \"calcs\": [\"mean\", \"max\", \"last\"]\n    }\n  }\n}\n```\n\n**Stat panel** (error rate):\n\n```json\n{\n  \"type\": \"stat\",\n  \"title\": \"Error Rate\",\n  \"gridPos\": {\"h\": 4, \"w\": 6, \"x\": 12, \"y\": 0},\n  \"targets\": [\n    {\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Heatmap panel** (latency distribution):\n\n```json\n{\n  \"type\": \"heatmap\",\n  \"title\": \"Request Duration Heatmap\",\n  \"gridPos\": {\"h\": 8, \"w\": 12, \"x\": 0, \"y\": 8},\n  \"targets\": [\n    {\n# ... (see EXAMPLES.md for complete configuration)\n```\n\nPanel selection guide:\n- **Time series**: Trends over time (rates, counts, durations)\n- **Stat**: Single current value with threshold coloring\n- **Gauge**: Percentage values (CPU, memory, disk usage)\n- **Bar gauge**: Comparing multiple values at a point in time\n- **Heatmap**: Distribution of values over time (latency percentiles)\n- **Table**: Detailed breakdown of multiple metrics\n- **Logs**: Raw log lines from Loki with filtering\n\n**Got:** Panels render correctly with data, visualizations match intended metric types, legends descriptive, thresholds highlight problems.\n\n**If fail:**\n- Test queries in Explore view with same time range and variables\n- Check for metric name typos or incorrect label filters\n- Verify aggregation functions match metric type (rate for counters, avg for gauges)\n- Review unit configurations (bytes, seconds, requests per second)\n- Enable \"Show query inspector\" to debug empty results\n\n### Step 4: Configure Rows and Layout\n\nOrganize panels into collapsible rows for logical grouping.\n\n```json\n{\n  \"panels\": [\n    {\n      \"type\": \"row\",\n      \"title\": \"High-Level Metrics\",\n      \"collapsed\": false,\n# ... (see EXAMPLES.md for complete configuration)\n```\n\nLayout best practices:\n- Grid is 24 units wide, each panel specifies `w` (width) and `h` (height)\n- Use rows to group related panels, collapse less critical sections by default\n- Place most critical metrics in first visible area (y=0-8)\n- Maintain consistent panel heights within rows (typically 4, 8, or 12 units)\n- Use full width (24) for time series, half width (12) for comparisons\n\n**Got:** Dashboard layout organized logically, rows collapse\u002Fexpand correctly, panels align visually without gaps.\n\n**If fail:**\n- Validate gridPos coordinates don't overlap\n- Check that row panels array contains panels (not null)\n- Verify y-coordinates increment logically down the page\n- Use Grafana UI \"Edit JSON\" to inspect grid positions\n\n### Step 5: Add Links and Drill-Downs\n\nCreate navigation paths between related dashboards.\n\nDashboard-level links in JSON:\n\n```json\n{\n  \"links\": [\n    {\n      \"title\": \"Service Details\",\n      \"type\": \"link\",\n      \"icon\": \"external link\",\n# ... (see EXAMPLES.md for complete configuration)\n```\n\nPanel-level data links:\n\n```json\n{\n  \"fieldConfig\": {\n    \"defaults\": {\n      \"links\": [\n        {\n          \"title\": \"View Logs for ${__field.labels.instance}\",\n# ... (see EXAMPLES.md for complete configuration)\n```\n\nLink variables:\n- `$service`, `$environment`: Dashboard template variables\n- `${__field.labels.instance}`: Label value from clicked data point\n- `${__from}`, `${__to}`: Current dashboard time range\n- `$__url_time_range`: Encoded time range for URL\n\n**Got:** Clicking panel elements or dashboard links navigates to related views with context preserved (time range, variables).\n\n**If fail:**\n- URL encode special characters in query parameters\n- Test links with various variable selections (All vs specific value)\n- Verify target dashboard UIDs exist and are accessible\n- Check that `includeVars` and `keepTime` flags work as expected\n\n### Step 6: Set Up Dashboard Provisioning\n\nVersion control dashboards as code for reproducible deployments.\n\nCreate provisioning directory structure:\n\n```bash\nmkdir -p \u002Fetc\u002Fgrafana\u002Fprovisioning\u002F{dashboards,datasources}\n```\n\nDatasource provisioning (`\u002Fetc\u002Fgrafana\u002Fprovisioning\u002Fdatasources\u002Fprometheus.yml`):\n\n```yaml\napiVersion: 1\n\ndatasources:\n  - name: Prometheus\n    type: prometheus\n    access: proxy\n# ... (see EXAMPLES.md for complete configuration)\n```\n\nDashboard provisioning (`\u002Fetc\u002Fgrafana\u002Fprovisioning\u002Fdashboards\u002Fdefault.yml`):\n\n```yaml\napiVersion: 1\n\nproviders:\n  - name: 'default'\n    orgId: 1\n    folder: 'Services'\n    type: file\n    disableDeletion: false\n    updateIntervalSeconds: 30\n    allowUiUpdates: true\n    options:\n      path: \u002Fvar\u002Flib\u002Fgrafana\u002Fdashboards\n      foldersFromFilesStructure: true\n```\n\nStore dashboard JSON files in `\u002Fvar\u002Flib\u002Fgrafana\u002Fdashboards\u002F`:\n\n```bash\n\u002Fvar\u002Flib\u002Fgrafana\u002Fdashboards\u002F\n├── api-service\u002F\n│   ├── overview.json\n│   └── details.json\n├── database\u002F\n│   └── postgres.json\n└── infrastructure\u002F\n    ├── nodes.json\n    └── kubernetes.json\n```\n\nUsing Docker Compose:\n\n```yaml\nversion: '3.8'\nservices:\n  grafana:\n    image: grafana\u002Fgrafana:10.2.0\n    ports:\n      - \"3000:3000\"\n    volumes:\n      - .\u002Fgrafana\u002Fprovisioning:\u002Fetc\u002Fgrafana\u002Fprovisioning\n      - .\u002Fgrafana\u002Fdashboards:\u002Fvar\u002Flib\u002Fgrafana\u002Fdashboards\n    environment:\n      - GF_SECURITY_ADMIN_PASSWORD=admin\n      - GF_USERS_ALLOW_SIGN_UP=false\n      - GF_AUTH_ANONYMOUS_ENABLED=true\n      - GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer\n```\n\n**Got:** Dashboards automatically loaded on Grafana startup, changes to JSON files reflected after update interval, version control tracks dashboard changes.\n\n**If fail:**\n- Check Grafana logs: `docker logs grafana | grep -i provisioning`\n- Verify JSON syntax: `python -m json.tool dashboard.json`\n- Ensure file permissions allow Grafana to read: `chmod 644 *.json`\n- Test with `allowUiUpdates: false` to prevent UI modifications\n- Validate provisioning config: `curl http:\u002F\u002Flocalhost:3000\u002Fapi\u002Fadmin\u002Fprovisioning\u002Fdashboards\u002Freload -X POST -H \"Authorization: Bearer $GRAFANA_API_KEY\"`\n\n## Validation\n\n- [ ] Dashboard loads without errors in Grafana UI\n- [ ] All template variables populate with expected values\n- [ ] Variable cascading works (selecting environment filters instances)\n- [ ] Panels display data for configured time ranges\n- [ ] Panel queries use variables correctly (no hardcoded values)\n- [ ] Thresholds highlight problem states appropriately\n- [ ] Legend formatting descriptive and not cluttered\n- [ ] Annotations appear for relevant events\n- [ ] Links navigate to correct dashboards with context preserved\n- [ ] Dashboard provisioned from JSON file (version controlled)\n- [ ] Responsive layout works on different screen sizes\n- [ ] Tooltip and hover interactions provide useful context\n\n## Pitfalls\n\n- **Variable not updating panels**: Ensure queries use `$variable` syntax, not hardcoded values. Check variable refresh settings.\n- **Empty panels with correct query**: Verify time range includes data points. Check scrape interval vs aggregation window (5m rate needs >5m of data).\n- **Legend too verbose**: Use `legendFormat` to show only relevant labels, not full metric name. Example: `{{method}} - {{status}}` instead of default.\n- **Inconsistent time ranges**: Set dashboard time sync so all panels share the same time window. Use \"Sync cursor\" for correlated investigation.\n- **Performance issues**: Avoid queries returning high cardinality series (>1000). Use recording rules or pre-aggregation. Limit time ranges for expensive queries.\n- **Dashboard drift**: Without provisioning, manual UI changes create version control conflicts. Use `allowUiUpdates: false` in production.\n- **Missing data links**: Data links require exact label names. Use `${__field.labels.labelname}` carefully, verify label exists in query result.\n- **Annotation overload**: Too many annotations clutter the view. Filter annotations by importance or use separate annotation tracks.\n\n## Related Skills\n\n- `setup-prometheus-monitoring` - Configure Prometheus data sources that feed Grafana dashboards\n- `configure-log-aggregation` - Set up Loki for log panel queries and log-based annotations\n- `define-slo-sli-sla` - Visualize SLO compliance and error budgets with Grafana stat and gauge panels\n- `instrument-distributed-tracing` - Add trace ID links from metrics panels to Tempo trace views\n","# Build Grafana Dashboards\n\nDesign and deploy Grafana dashboards with best practices for maintainability, reusability, and version control.\n\n## When to Use\n\n- Creating visual representations of Prometheus, Loki, or other data source metrics\n- Building operational dashboards for SRE teams and incident responders\n- Establishing executive-level reporting dashboards for SLO compliance\n- Migrating dashboards from manual creation to version-controlled provisioning\n- Standardizing dashboard layouts across teams with template variables\n- Creating drill-down experiences from high-level overviews to detailed metrics\n\n## Inputs\n\n- **Required**: Data source configuration (Prometheus, Loki, Tempo, etc.)\n- **Required**: Metrics or logs to visualize with their query patterns\n- **Optional**: Template variables for multi-service or multi-environment views\n- **Optional**: Existing dashboard JSON for migration or modification\n- **Optional**: Annotation queries for event correlation (deployments, incidents)\n\n## Procedure\n\n> See [Extended Examples](references\u002FEXAMPLES.md) for complete configuration files and templates.\n\n\n### Step 1: Design Dashboard Structure\n\nPlan dashboard layout and organization before building panels.\n\nCreate a dashboard specification document:\n\n```markdown\n# Service Overview Dashboard\n\n## Purpose\nReal-time operational view for on-call engineers monitoring the API service.\n\n## Rows\n1. High-Level Metrics (collapsed by default)\n   - Request rate, error rate, latency (RED metrics)\n   - Service uptime, instance count\n2. Detailed Metrics (expanded by default)\n   - Per-endpoint latency breakdown\n   - Error rate by status code\n   - Database connection pool status\n3. Resource Utilization\n   - CPU, memory, disk usage per instance\n   - Network I\u002FO rates\n4. Logs (collapsed by default)\n   - Recent errors from Loki\n   - Alert firing history\n\n## Variables\n- `environment`: production, staging, development\n- `instance`: all instances or specific instance selection\n- `interval`: aggregation window (5m, 15m, 1h)\n\n## Annotations\n- Deployment events from CI\u002FCD system\n- Alert firing\u002Fresolving events\n```\n\nKey design principles:\n- **Most important metrics first**: Critical metrics at the top, details below\n- **Consistent time ranges**: Synchronize time across all panels\n- **Drill-down paths**: Link from high-level to detailed dashboards\n- **Responsive layout**: Use rows and panel widths that work on various screens\n\n**Got:** Clear dashboard structure documented, stakeholders aligned on metrics and layout priorities.\n\n**If fail:**\n- Conduct dashboard design review with end users (SREs, developers)\n- Benchmark against industry standards (USE method, RED method, Four Golden Signals)\n- Review existing dashboards in team for consistency patterns\n\n### Step 2: Create Dashboard with Template Variables\n\nBuild the dashboard foundation with reusable variables for filtering.\n\nCreate dashboard JSON structure (or use UI, then export):\n\n```json\n{\n  \"dashboard\": {\n    \"title\": \"API Service Overview\",\n    \"uid\": \"api-service-overview\",\n    \"version\": 1,\n    \"timezone\": \"browser\",\n    \"editable\": true,\n    \"graphTooltip\": 1,\n    \"time\": {\n      \"from\": \"now-6h\",\n      \"to\": \"now\"\n    },\n    \"refresh\": \"30s\",\n    \"templating\": {\n      \"list\": [\n        {\n          \"name\": \"environment\",\n          \"type\": \"query\",\n          \"datasource\": \"Prometheus\",\n          \"query\": \"label_values(up{job=\\\"api-service\\\"}, environment)\",\n          \"multi\": false,\n          \"includeAll\": false,\n          \"refresh\": 1,\n          \"sort\": 1,\n          \"current\": {\n            \"selected\": false,\n            \"text\": \"production\",\n            \"value\": \"production\"\n          }\n        },\n        {\n          \"name\": \"instance\",\n          \"type\": \"query\",\n          \"datasource\": \"Prometheus\",\n          \"query\": \"label_values(up{job=\\\"api-service\\\",environment=\\\"$environment\\\"}, instance)\",\n          \"multi\": true,\n          \"includeAll\": true,\n          \"refresh\": 1,\n          \"allValue\": \".*\",\n          \"current\": {\n            \"selected\": true,\n            \"text\": \"All\",\n            \"value\": \"$__all\"\n          }\n        },\n        {\n          \"name\": \"interval\",\n          \"type\": \"interval\",\n          \"options\": [\n            {\"text\": \"1m\", \"value\": \"1m\"},\n            {\"text\": \"5m\", \"value\": \"5m\"},\n            {\"text\": \"15m\", \"value\": \"15m\"},\n            {\"text\": \"1h\", \"value\": \"1h\"}\n          ],\n          \"current\": {\n            \"text\": \"5m\",\n            \"value\": \"5m\"\n          },\n          \"auto\": false\n        }\n      ]\n    },\n    \"annotations\": {\n      \"list\": [\n        {\n          \"name\": \"Deployments\",\n          \"datasource\": \"Prometheus\",\n          \"enable\": true,\n          \"expr\": \"changes(app_version{job=\\\"api-service\\\",environment=\\\"$environment\\\"}[5m]) > 0\",\n          \"step\": \"60s\",\n          \"iconColor\": \"rgba(0, 211, 255, 1)\",\n          \"tagKeys\": \"version\"\n        }\n      ]\n    }\n  }\n}\n```\n\nVariable types and use cases:\n- **Query variables**: Dynamic lists from data source (`label_values()`, `query_result()`)\n- **Interval variables**: Aggregation windows for queries\n- **Custom variables**: Static lists for non-metric selections\n- **Constant variables**: Shared values across panels (data source names, thresholds)\n- **Text box variables**: Free-form input for filtering\n\n**Got:** Variables populate correctly from data source, cascading filters work (environment filters instances), default selections appropriate.\n\n**If fail:**\n- Test variable queries independently in Prometheus UI\n- Check for circular dependencies (variable A depends on B depends on A)\n- Verify regex patterns in `allValue` field for multi-select variables\n- Review variable refresh settings (on dashboard load vs on time range change)\n\n### Step 3: Build Visualization Panels\n\nCreate panels for each metric with appropriate visualization types.\n\n**Time series panel** (request rate):\n\n```json\n{\n  \"type\": \"timeseries\",\n  \"title\": \"Request Rate\",\n  \"gridPos\": {\"h\": 8, \"w\": 12, \"x\": 0, \"y\": 0},\n  \"targets\": [\n    {\n      \"expr\": \"sum(rate(http_requests_total{job=\\\"api-service\\\",environment=\\\"$environment\\\",instance=~\\\"$instance\\\"}[$interval])) by (method)\",\n      \"legendFormat\": \"{{method}}\",\n      \"refId\": \"A\"\n    }\n  ],\n  \"fieldConfig\": {\n    \"defaults\": {\n      \"unit\": \"reqps\",\n      \"color\": {\n        \"mode\": \"palette-classic\"\n      },\n      \"custom\": {\n        \"drawStyle\": \"line\",\n        \"lineInterpolation\": \"smooth\",\n        \"fillOpacity\": 10,\n        \"spanNulls\": true\n      },\n      \"thresholds\": {\n        \"mode\": \"absolute\",\n        \"steps\": [\n          {\"value\": null, \"color\": \"green\"},\n          {\"value\": 1000, \"color\": \"yellow\"},\n          {\"value\": 5000, \"color\": \"red\"}\n        ]\n      }\n    }\n  },\n  \"options\": {\n    \"tooltip\": {\n      \"mode\": \"multi\",\n      \"sort\": \"desc\"\n    },\n    \"legend\": {\n      \"displayMode\": \"table\",\n      \"placement\": \"right\",\n      \"calcs\": [\"mean\", \"max\", \"last\"]\n    }\n  }\n}\n```\n\n**Stat panel** (error rate):\n\n```json\n{\n  \"type\": \"stat\",\n  \"title\": \"Error Rate\",\n  \"gridPos\": {\"h\": 4, \"w\": 6, \"x\": 12, \"y\": 0},\n  \"targets\": [\n    {\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Heatmap panel** (latency distribution):\n\n```json\n{\n  \"type\": \"heatmap\",\n  \"title\": \"Request Duration Heatmap\",\n  \"gridPos\": {\"h\": 8, \"w\": 12, \"x\": 0, \"y\": 8},\n  \"targets\": [\n    {\n# ... (see EXAMPLES.md for complete configuration)\n```\n\nPanel selection guide:\n- **Time series**: Trends over time (rates, counts, durations)\n- **Stat**: Single current value with threshold coloring\n- **Gauge**: Percentage values (CPU, memory, disk usage)\n- **Bar gauge**: Comparing multiple values at a point in time\n- **Heatmap**: Distribution of values over time (latency percentiles)\n- **Table**: Detailed breakdown of multiple metrics\n- **Logs**: Raw log lines from Loki with filtering\n\n**Got:** Panels render correctly with data, visualizations match intended metric types, legends descriptive, thresholds highlight problems.\n\n**If fail:**\n- Test queries in Explore view with same time range and variables\n- Check for metric name typos or incorrect label filters\n- Verify aggregation functions match metric type (rate for counters, avg for gauges)\n- Review unit configurations (bytes, seconds, requests per second)\n- Enable \"Show query inspector\" to debug empty results\n\n### Step 4: Configure Rows and Layout\n\nOrganize panels into collapsible rows for logical grouping.\n\n```json\n{\n  \"panels\": [\n    {\n      \"type\": \"row\",\n      \"title\": \"High-Level Metrics\",\n      \"collapsed\": false,\n# ... (see EXAMPLES.md for complete configuration)\n```\n\nLayout best practices:\n- Grid is 24 units wide, each panel specifies `w` (width) and `h` (height)\n- Use rows to group related panels, collapse less critical sections by default\n- Place most critical metrics in first visible area (y=0-8)\n- Maintain consistent panel heights within rows (typically 4, 8, or 12 units)\n- Use full width (24) for time series, half width (12) for comparisons\n\n**Got:** Dashboard layout organized logically, rows collapse\u002Fexpand correctly, panels align visually without gaps.\n\n**If fail:**\n- Validate gridPos coordinates don't overlap\n- Check that row panels array contains panels (not null)\n- Verify y-coordinates increment logically down the page\n- Use Grafana UI \"Edit JSON\" to inspect grid positions\n\n### Step 5: Add Links and Drill-Downs\n\nCreate navigation paths between related dashboards.\n\nDashboard-level links in JSON:\n\n```json\n{\n  \"links\": [\n    {\n      \"title\": \"Service Details\",\n      \"type\": \"link\",\n      \"icon\": \"external link\",\n# ... (see EXAMPLES.md for complete configuration)\n```\n\nPanel-level data links:\n\n```json\n{\n  \"fieldConfig\": {\n    \"defaults\": {\n      \"links\": [\n        {\n          \"title\": \"View Logs for ${__field.labels.instance}\",\n# ... (see EXAMPLES.md for complete configuration)\n```\n\nLink variables:\n- `$service`, `$environment`: Dashboard template variables\n- `${__field.labels.instance}`: Label value from clicked data point\n- `${__from}`, `${__to}`: Current dashboard time range\n- `$__url_time_range`: Encoded time range for URL\n\n**Got:** Clicking panel elements or dashboard links navigates to related views with context preserved (time range, variables).\n\n**If fail:**\n- URL encode special characters in query parameters\n- Test links with various variable selections (All vs specific value)\n- Verify target dashboard UIDs exist and are accessible\n- Check that `includeVars` and `keepTime` flags work as expected\n\n### Step 6: Set Up Dashboard Provisioning\n\nVersion control dashboards as code for reproducible deployments.\n\nCreate provisioning directory structure:\n\n```bash\nmkdir -p \u002Fetc\u002Fgrafana\u002Fprovisioning\u002F{dashboards,datasources}\n```\n\nDatasource provisioning (`\u002Fetc\u002Fgrafana\u002Fprovisioning\u002Fdatasources\u002Fprometheus.yml`):\n\n```yaml\napiVersion: 1\n\ndatasources:\n  - name: Prometheus\n    type: prometheus\n    access: proxy\n# ... (see EXAMPLES.md for complete configuration)\n```\n\nDashboard provisioning (`\u002Fetc\u002Fgrafana\u002Fprovisioning\u002Fdashboards\u002Fdefault.yml`):\n\n```yaml\napiVersion: 1\n\nproviders:\n  - name: 'default'\n    orgId: 1\n    folder: 'Services'\n    type: file\n    disableDeletion: false\n    updateIntervalSeconds: 30\n    allowUiUpdates: true\n    options:\n      path: \u002Fvar\u002Flib\u002Fgrafana\u002Fdashboards\n      foldersFromFilesStructure: true\n```\n\nStore dashboard JSON files in `\u002Fvar\u002Flib\u002Fgrafana\u002Fdashboards\u002F`:\n\n```bash\n\u002Fvar\u002Flib\u002Fgrafana\u002Fdashboards\u002F\n├── api-service\u002F\n│   ├── overview.json\n│   └── details.json\n├── database\u002F\n│   └── postgres.json\n└── infrastructure\u002F\n    ├── nodes.json\n    └── kubernetes.json\n```\n\nUsing Docker Compose:\n\n```yaml\nversion: '3.8'\nservices:\n  grafana:\n    image: grafana\u002Fgrafana:10.2.0\n    ports:\n      - \"3000:3000\"\n    volumes:\n      - .\u002Fgrafana\u002Fprovisioning:\u002Fetc\u002Fgrafana\u002Fprovisioning\n      - .\u002Fgrafana\u002Fdashboards:\u002Fvar\u002Flib\u002Fgrafana\u002Fdashboards\n    environment:\n      - GF_SECURITY_ADMIN_PASSWORD=admin\n      - GF_USERS_ALLOW_SIGN_UP=false\n      - GF_AUTH_ANONYMOUS_ENABLED=true\n      - GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer\n```\n\n**Got:** Dashboards automatically loaded on Grafana startup, changes to JSON files reflected after update interval, version control tracks dashboard changes.\n\n**If fail:**\n- Check Grafana logs: `docker logs grafana | grep -i provisioning`\n- Verify JSON syntax: `python -m json.tool dashboard.json`\n- Ensure file permissions allow Grafana to read: `chmod 644 *.json`\n- Test with `allowUiUpdates: false` to prevent UI modifications\n- Validate provisioning config: `curl http:\u002F\u002Flocalhost:3000\u002Fapi\u002Fadmin\u002Fprovisioning\u002Fdashboards\u002Freload -X POST -H \"Authorization: Bearer $GRAFANA_API_KEY\"`\n\n## Validation\n\n- [ ] Dashboard loads without errors in Grafana UI\n- [ ] All template variables populate with expected values\n- [ ] Variable cascading works (selecting environment filters instances)\n- [ ] Panels display data for configured time ranges\n- [ ] Panel queries use variables correctly (no hardcoded values)\n- [ ] Thresholds highlight problem states appropriately\n- [ ] Legend formatting descriptive and not cluttered\n- [ ] Annotations appear for relevant events\n- [ ] Links navigate to correct dashboards with context preserved\n- [ ] Dashboard provisioned from JSON file (version controlled)\n- [ ] Responsive layout works on different screen sizes\n- [ ] Tooltip and hover interactions provide useful context\n\n## Pitfalls\n\n- **Variable not updating panels**: Ensure queries use `$variable` syntax, not hardcoded values. Check variable refresh settings.\n- **Empty panels with correct query**: Verify time range includes data points. Check scrape interval vs aggregation window (5m rate needs >5m of data).\n- **Legend too verbose**: Use `legendFormat` to show only relevant labels, not full metric name. Example: `{{method}} - {{status}}` instead of default.\n- **Inconsistent time ranges**: Set dashboard time sync so all panels share the same time window. Use \"Sync cursor\" for correlated investigation.\n- **Performance issues**: Avoid queries returning high cardinality series (>1000). Use recording rules or pre-aggregation. Limit time ranges for expensive queries.\n- **Dashboard drift**: Without provisioning, manual UI changes create version control conflicts. Use `allowUiUpdates: false` in production.\n- **Missing data links**: Data links require exact label names. Use `${__field.labels.labelname}` carefully, verify label exists in query result.\n- **Annotation overload**: Too many annotations clutter the view. Filter annotations by importance or use separate annotation tracks.\n\n## Related Skills\n\n- `setup-prometheus-monitoring` - Configure Prometheus data sources that feed Grafana dashboards\n- `configure-log-aggregation` - Set up Loki for log panel queries and log-based annotations\n- `define-slo-sli-sla` - Visualize SLO compliance and error budgets with Grafana stat and gauge panels\n- `instrument-distributed-tracing` - Add trace ID links from metrics panels to Tempo trace views\n",{"name":5,"locale":23,"license":14,"metadata":24,"translator":31,"description":32,"allowed-tools":33,"source_commit":34,"source_locale":35,"translation_date":36},"caveman-lite",{"tags":25,"author":26,"domain":27,"version":28,"language":29,"complexity":30},"grafana, dashboards, visualization, panels, provisioning","Philipp Thoss","observability","1.0","multi","intermediate","Julius Brussee homage — caveman","Create production-ready Grafana dashboards with reusable panels, template variables, annotations, and provisioning for version-controlled dashboard deployment. Use when creating visual representations of Prometheus, Loki, or other data source metrics, building operational dashboards for SRE teams, migrating from manual dashboard creation to version-controlled provisioning, or establishing executive-level SLO compliance reporting.\n","Read Write Edit Bash Grep Glob","82c77053","en","2026-04-19","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Fbuild-grafana-dashboards",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add roohe\u002Fagentic-super-skills --skill build-grafana-dashboards",{"tool":51,"command":52},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill build-grafana-dashboards",{"tool":54,"command":55},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill build-grafana-dashboards","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fbuild-grafana-dashboards\u002FSKILL.md",true,[59],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002FEXAMPLES.md","REFERENCE","参考文档",8264,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fbuild-grafana-dashboards\u002Freferences\u002FEXAMPLES.md",[66,73,80,87,94,101],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]