TT Bigdata TT Bigdata
首页
GitHub (opens new window)
JaneTTR

JaneTTR

数据酿造智慧,每一滴都是沉淀!
  • 报错解决

  • 系统适配

  • 监控与调优

    • Ambari-Metrics插件
    • Infinity插件
      • 准备工作

      • 创建最简DEMO

        • Grafana9.3.2+Infinity2.3.1

          • 快速创建一个简单demo
          • Panel JSON 配置示例
            • 完整 Panel JSON 配置
        • Grafana11.5.2+Infinity3.4.1

    • 组件配置调优
    • 组件调优指南
    • 1v1指导调优
  • BUG临时处理
  • 实验室

  • 运维资料
  • 监控与调优
  • Infinity插件
  • 创建最简DEMO
  • Grafana9.3.2+Infinity2.3.1
JaneTTR
2025-08-25
目录
完整 Panel JSON 配置

Panel JSON 配置示例

# 完整 Panel JSON 配置

以下是最终的 Panel JSON,可以导入 Grafana 直接复现 Demo:

{
  "id": 2,
  "gridPos": {
    "h": 9,
    "w": 12,
    "x": 0,
    "y": 0
  },
  "type": "timeseries",
  "title": "Panel Title",
  "datasource": {
    "uid": "d1JEgHXHz",
    "type": "yesoreyeram-infinity-datasource"
  },
  "fieldConfig": {
    "defaults": {
      "custom": {
        "drawStyle": "line",
        "lineInterpolation": "linear",
        "barAlignment": 0,
        "lineWidth": 1,
        "fillOpacity": 0,
        "gradientMode": "none",
        "spanNulls": false,
        "showPoints": "auto",
        "pointSize": 5,
        "stacking": {
          "mode": "none",
          "group": "A"
        },
        "axisPlacement": "auto",
        "axisLabel": "",
        "axisColorMode": "text",
        "scaleDistribution": {
          "type": "linear"
        },
        "axisCenteredZero": false,
        "hideFrom": {
          "tooltip": false,
          "viz": false,
          "legend": false
        },
        "thresholdsStyle": {
          "mode": "off"
        }
      },
      "color": {
        "mode": "palette-classic"
      },
      "mappings": [],
      "thresholds": {
        "mode": "absolute",
        "steps": [
          {
            "color": "green",
            "value": null
          },
          {
            "color": "red",
            "value": 80
          }
        ]
      }
    },
    "overrides": []
  },
  "options": {
    "tooltip": {
      "mode": "single",
      "sort": "none"
    },
    "legend": {
      "showLegend": true,
      "displayMode": "list",
      "placement": "bottom",
      "calcs": []
    }
  },
  "targets": [
    {
      "datasource": {
        "type": "yesoreyeram-infinity-datasource",
        "uid": "d1JEgHXHz"
      },
      "columns": [
        {
          "selector": "key",
          "text": "Time",
          "type": "timestamp_epoch"
        },
        {
          "selector": "value",
          "text": "cores",
          "type": "number"
        }
      ],
      "filters": [],
      "format": "timeseries",
      "global_query_id": "",
      "parser": "backend",
      "refId": "A",
      "root_selector": "metrics[0].metrics ~> $each(function($v, $k) {\n  {\n    \"key\": $k,\n    \"value\": $v\n  }\n})\n\n",
      "source": "url",
      "type": "json",
      "url": "/ws/v1/timeline/metrics?appId=HOST&hostname=hadoop1&metricNames=cpu_num&startTime=${__from}&endTime=${__to}",
      "url_options": {
        "data": "",
        "method": "GET"
      }
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#Grafana#Infinity#监控运维#Ambari-Metrics
快速创建一个简单demo
快速创建一个简单demo

← 快速创建一个简单demo 快速创建一个简单demo→

最近更新
01
当前版本 2026/08
08-29
02
把 Ambari Server HA 稳稳地跑起来
08-17
03
从一次启用操作追到主备就绪
08-17
更多文章>
Theme by Vdoing | Copyright © 2017-2026 JaneTTR | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式