首页/云/可观测性速查/看板 JSON 的结构要点
本包目录(282 条)
监控体系与方法40 条Prometheus 与采集64 条
Grafana 与看板53 条
日志平台52 条链路追踪23 条告警与响应50 条

看板 JSON 的结构要点

看板以 JSON 为真源:uid/title/时间范围/变量/面板数组构成骨架;面板含 gridPos 栅格、targets 查询与 fieldConfig 字段配置,可整体导入导出。

可观测性速查云更新于 2026-10-12

精简结构示例

精简结构示例
{
  "uid": "app-overview",
  "title": "应用总览",
  "tags": ["app"],
  "refresh": "30s",
  "time": {"from": "now-6h", "to": "now"},
  "panels": [
    {"id": 1, "type": "timeseries", "title": "QPS",
     "gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
     "targets": [{"refId": "A", "expr": "sum(rate(http_requests_total[5m]))"}]}
  ]
}
gridPos24 列栅格:h 高、w 宽、x/y 坐标
templating.list模板变量定义数组
schemaVersion随 Grafana 版本升级,导入旧 JSON 会自动迁移

易错点

  • 同 uid 重复导入会提示已存在:UI 导入需勾选 overwrite,API 需带 overwrite: true
  • 手改 JSON 时留了尾逗号或注释,JSON.parse 直接失败,导入前先用校验工具过一遍

数据来源与参考

  • Grafana 官方文档 · Dashboard JSON model
​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌