metric: add more lint rules for metric panels (#58436)

close pingcap/tidb#58435
This commit is contained in:
D3Hunter
2024-12-20 20:22:46 +08:00
committed by GitHub
parent d12ca21678
commit ac60120ce5
10 changed files with 3856 additions and 3780 deletions

View File

@ -254,8 +254,6 @@ const (
JobVersion1 JobVersion = 1
// JobVersion2 is the second version of DDL job where job args are stored as
// typed structs, we start to use this version from v8.4.0.
// Note: this version is not enabled right now except in some test cases, will
// enable it after we have CI to run both versions.
JobVersion2 JobVersion = 2
)

View File

@ -86,7 +86,7 @@
},
"fontSize": "100%",
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 1
@ -253,6 +253,8 @@
"refId": "M"
}
],
"title": "Probe Success",
"description": "probe success",
"timeFrom": "1s",
"transform": "timeseries_aggregations",
"type": "table-old"
@ -271,7 +273,7 @@
},
"fontSize": "100%",
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 1
@ -438,6 +440,8 @@
"refId": "M"
}
],
"title": "Probe Success-2",
"description": "probe success 2",
"timeFrom": "1s",
"transform": "timeseries_aggregations",
"type": "table-old"
@ -524,7 +528,8 @@
}
],
"thresholds": "0,2",
"title": "PD role",
"title": "PD Role",
"description": "PD Role",
"type": "singlestat",
"valueFontSize": "50%",
"valueMaps": [
@ -618,7 +623,7 @@
}
],
"thresholds": "",
"title": "Storage capacity",
"title": "Storage Capacity",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
@ -702,7 +707,7 @@
}
],
"thresholds": "",
"title": "Current storage size",
"title": "Current Storage Size",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
@ -782,7 +787,7 @@
}
],
"thresholds": "",
"title": "Number of Regions",
"title": "Number Of Regions",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
@ -863,7 +868,7 @@
}
],
"thresholds": "",
"title": "Normal stores",
"title": "Normal Stores",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
@ -979,7 +984,7 @@
}
],
"timeFrom": "1s",
"title": "Abnormal stores",
"title": "Abnormal Stores",
"transform": "timeseries_aggregations",
"type": "table-old"
},
@ -1251,7 +1256,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "99% completed cmds duration seconds",
"title": "99% Completed Cmds Duration Seconds",
"tooltip": {
"msResolution": false,
"shared": true,
@ -1352,7 +1357,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Handle requests duration seconds",
"title": "Handle Requests Duration Seconds",
"tooltip": {
"shared": true,
"sort": 0,
@ -1449,7 +1454,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Region health",
"title": "Region Health",
"tooltip": {
"shared": true,
"sort": 0,
@ -1539,7 +1544,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Hot write Region's leader distribution",
"title": "Hot Write Region's Leader Distribution",
"tooltip": {
"shared": true,
"sort": 0,
@ -1630,7 +1635,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Hot read Region's leader distribution",
"title": "Hot Read Region's Leader Distribution",
"tooltip": {
"shared": true,
"sort": 0,
@ -1722,7 +1727,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Region heartbeat report",
"title": "Region Heartbeat Report",
"tooltip": {
"shared": true,
"sort": 0,
@ -1812,7 +1817,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "99% Region heartbeat latency",
"title": "99% Region Heartbeat Latency",
"tooltip": {
"shared": true,
"sort": 0,
@ -3431,7 +3436,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 4
@ -3494,7 +3499,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "leader",
"title": "Leader",
"tooltip": {
"msResolution": false,
"shared": true,
@ -3549,7 +3554,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 4
@ -3597,7 +3602,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "region",
"title": "Region",
"tooltip": {
"msResolution": false,
"shared": true,
@ -3649,7 +3654,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 12
@ -3746,7 +3751,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 12
@ -3844,7 +3849,7 @@
"fill": 5,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 20
@ -3892,7 +3897,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "store size",
"title": "Store Size",
"tooltip": {
"shared": true,
"sort": 0,
@ -3943,7 +3948,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 20
@ -3990,7 +3995,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "cf size",
"title": "CF Size",
"tooltip": {
"shared": true,
"sort": 2,
@ -4044,7 +4049,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 28
@ -4096,7 +4101,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "channel full",
"title": "Channel Full",
"tooltip": {
"msResolution": false,
"shared": true,
@ -4151,7 +4156,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 28
@ -4204,7 +4209,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "server report failures",
"title": "Server Report Failures",
"tooltip": {
"msResolution": false,
"shared": true,
@ -4256,7 +4261,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 36
@ -4304,7 +4309,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "scheduler pending commands",
"title": "Scheduler Pending Commands",
"tooltip": {
"shared": true,
"sort": 0,
@ -4355,7 +4360,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 36
@ -4405,7 +4410,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "coprocessor executor count",
"title": "Coprocessor Executor Count",
"tooltip": {
"shared": true,
"sort": 0,
@ -4455,7 +4460,7 @@
},
"fill": 1,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 44
@ -4523,7 +4528,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "coprocessor request duration",
"title": "Coprocessor Request Duration",
"tooltip": {
"shared": true,
"sort": 0,
@ -4573,7 +4578,7 @@
},
"fill": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 44
@ -4618,7 +4623,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "raft store CPU",
"title": "Raft Store CPU",
"tooltip": {
"shared": true,
"sort": 0,
@ -4668,7 +4673,7 @@
},
"fill": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 52
@ -4776,7 +4781,7 @@
},
"fontSize": "100%",
"gridPos": {
"h": 5,
"h": 7,
"w": 6,
"x": 0,
"y": 5
@ -4871,7 +4876,7 @@
},
"fontSize": "100%",
"gridPos": {
"h": 5,
"h": 7,
"w": 6,
"x": 6,
"y": 5
@ -4997,7 +5002,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 5,
"h": 7,
"w": 12,
"x": 12,
"y": 5
@ -5101,7 +5106,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 5,
"h": 7,
"w": 12,
"x": 0,
"y": 10
@ -5152,7 +5157,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Load [1m]",
"title": "Load-[1m]",
"tooltip": {
"shared": true,
"sort": 0,
@ -5202,7 +5207,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 5,
"h": 7,
"w": 12,
"x": 12,
"y": 10
@ -5302,7 +5307,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 5,
"h": 7,
"w": 12,
"x": 0,
"y": 15
@ -5414,7 +5419,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 5,
"h": 7,
"w": 12,
"x": 12,
"y": 15
@ -5518,7 +5523,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 5,
"h": 7,
"w": 12,
"x": 0,
"y": 20
@ -5621,7 +5626,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 5,
"h": 7,
"w": 12,
"x": 12,
"y": 20
@ -5724,7 +5729,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 5,
"h": 7,
"w": 12,
"x": 0,
"y": 25

File diff suppressed because it is too large Load Diff

View File

@ -98,7 +98,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 1
@ -222,7 +222,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 1
@ -352,7 +352,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 7
@ -466,7 +466,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 7
@ -577,7 +577,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 13
@ -680,7 +680,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 13
@ -800,7 +800,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 19
@ -872,7 +872,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Slow query",
"title": "Slow Query",
"tooltip": {
"shared": true,
"sort": 0,
@ -925,7 +925,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 19
@ -1062,7 +1062,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 25
@ -1158,7 +1158,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 25
@ -1254,7 +1254,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 31
@ -1350,7 +1350,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 31
@ -2082,7 +2082,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Queries in Multi-Statement",
"title": "Queries In Multi-Statement",
"tooltip": {
"msResolution": false,
"shared": true,
@ -2762,7 +2762,7 @@
"refId": "B"
}
],
"title": "Runtime GC rate and GOMEMLIMIT",
"title": "Runtime GC Rate And GOMEMLIMIT",
"type": "timeseries"
},
{
@ -5281,7 +5281,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Transaction Write KV Num Rate and Sum",
"title": "Transaction Write KV Num Rate And Sum",
"tooltip": {
"msResolution": false,
"shared": true,
@ -5661,7 +5661,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Transaction Write Size Bytes Rate and Sum",
"title": "Transaction Write Size Bytes Rate And Sum",
"tooltip": {
"msResolution": false,
"shared": true,
@ -6368,7 +6368,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Transaction Commit .99 Backoff",
"title": "Transaction Commit P99 Backoff",
"tooltip": {
"msResolution": false,
"shared": true,
@ -6781,7 +6781,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Transaction execution states duration",
"title": "Transaction Execution States Duration",
"tooltip": {
"shared": true,
"sort": 0,
@ -6896,7 +6896,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Transaction with lock execution states duration",
"title": "Transaction With Lock Execution States Duration",
"tooltip": {
"shared": true,
"sort": 0,
@ -7010,7 +7010,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Transaction execution states duration",
"title": "Transaction Execution States Duration",
"tooltip": {
"shared": true,
"sort": 0,
@ -7109,7 +7109,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Transaction enter state",
"title": "Transaction Enter State",
"tooltip": {
"shared": true,
"sort": 0,
@ -7208,7 +7208,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Transaction leave state",
"title": "Transaction Leave State",
"tooltip": {
"shared": true,
"sort": 0,
@ -7307,7 +7307,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Transaction state count change",
"title": "Transaction State Count Change",
"tooltip": {
"shared": true,
"sort": 0,
@ -7872,7 +7872,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 5
@ -7983,7 +7983,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 5
@ -8094,7 +8094,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 13
@ -8205,7 +8205,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 13
@ -8313,7 +8313,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 21
@ -8421,7 +8421,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 21
@ -8529,7 +8529,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 29
@ -8637,7 +8637,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 29
@ -8742,7 +8742,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 37
@ -8852,7 +8852,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 37
@ -8963,7 +8963,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 45
@ -9063,7 +9063,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 45
@ -10681,7 +10681,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "KV Request Duration 99 by store",
"title": "KV Request Duration 99 By Store",
"tooltip": {
"msResolution": false,
"shared": true,
@ -10786,7 +10786,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "KV Request Duration 99 by type",
"title": "KV Request Duration 99 By Type",
"tooltip": {
"msResolution": false,
"shared": true,
@ -10992,7 +10992,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "KV Request Forwarding OPS by Type",
"title": "KV Request Forwarding OPS By Type",
"tooltip": {
"msResolution": true,
"shared": true,
@ -11814,7 +11814,7 @@
],
"thresholds": [],
"timeRegions": [],
"title": "Client-side slow score",
"title": "Client-side Slow Score",
"tooltip": {
"shared": true,
"sort": 0,
@ -11905,7 +11905,7 @@
],
"thresholds": [],
"timeRegions": [],
"title": "TiKV-side slow score",
"title": "TiKV-side Slow Score",
"tooltip": {
"shared": true,
"sort": 0,
@ -12911,7 +12911,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Request forwarded status",
"title": "Request Forwarded Status",
"tooltip": {
"shared": true,
"sort": 0,
@ -14312,7 +14312,7 @@
],
"thresholds": [],
"timeRegions": [],
"title": "Infoschema v2 Cache Operation",
"title": "Infoschema V2 Cache Operation",
"tooltip": {
"shared": true,
"sort": 2,
@ -14375,7 +14375,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 38
@ -14429,7 +14429,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Infoschema v2 Cache Size",
"title": "Infoschema V2 Cache Size",
"tooltip": {
"shared": true,
"sort": 0,
@ -15861,7 +15861,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 20
@ -15963,7 +15963,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 20
@ -16066,7 +16066,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 30
@ -16161,7 +16161,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 28
@ -16354,7 +16354,7 @@
]
},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 36
@ -16431,7 +16431,7 @@
"overrides": []
},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 20
@ -16465,7 +16465,7 @@
"refId": "A"
}
],
"title": "Uncompleted Subtask Distribution on TiDB Nodes",
"title": "Uncompleted Subtask Distribution On TiDB Nodes",
"type": "piechart"
},
{
@ -16522,7 +16522,7 @@
"overrides": []
},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 36
@ -16558,7 +16558,7 @@
"refId": "B"
}
],
"title": "Slots usage",
"title": "Slots Usage",
"type": "timeseries"
}
],
@ -17877,7 +17877,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 48
@ -17976,7 +17976,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 48
@ -18068,7 +18068,7 @@
"x": 0,
"y": 56,
"w": 8,
"h": 8
"h": 7
},
"id": 23763572008,
"targets": [
@ -18173,7 +18173,7 @@
"x": 8,
"y": 56,
"w": 8,
"h": 8
"h": 7
},
"id": 23763572009,
"targets": [
@ -18273,12 +18273,12 @@
},
{
"type": "graph",
"title": "Number of Bindings in Cache",
"title": "Number Of Bindings In Cache",
"gridPos": {
"x": 16,
"y": 56,
"w": 8,
"h": 8
"h": 7
},
"id": 23763572010,
"targets": [
@ -21026,7 +21026,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 20
@ -21148,7 +21148,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 20
@ -21275,7 +21275,7 @@
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 28
@ -21378,7 +21378,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 28
@ -21491,7 +21491,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 36
@ -21591,7 +21591,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 36
@ -21689,7 +21689,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 44
@ -21789,7 +21789,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 44
@ -21888,7 +21888,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 52
@ -22009,7 +22009,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 52
@ -22130,7 +22130,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 60
@ -22260,7 +22260,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 60
@ -22390,7 +22390,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 68
@ -22504,7 +22504,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 68
@ -22615,7 +22615,7 @@
"fill": 8,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 74
@ -22786,7 +22786,7 @@
]
},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 74
@ -22876,7 +22876,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 111
@ -23004,7 +23004,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 20
@ -23100,7 +23100,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 20
@ -23211,7 +23211,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 105
@ -23311,7 +23311,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 105
@ -23358,7 +23358,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Coprocessor Response Size Per Instance and TiKV",
"title": "Coprocessor Response Size Per Instance And TiKV",
"tooltip": {
"shared": true,
"sort": 0,
@ -23411,7 +23411,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 113
@ -23553,7 +23553,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 20
@ -23614,7 +23614,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Total encode/deliver/import-kv speed",
"title": "Total Encode/Deliver/Import-kv Speed",
"tooltip": {
"shared": true,
"sort": 0,
@ -23665,7 +23665,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 20
@ -23734,7 +23734,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Encoded/Delivered/Imported data size",
"title": "Encoded/Delivered/Imported Data Size",
"tooltip": {
"shared": true,
"sort": 0,
@ -23785,7 +23785,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 28
@ -23830,7 +23830,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Delivered kv count",
"title": "Delivered KV Count",
"tooltip": {
"shared": true,
"sort": 0,
@ -23883,7 +23883,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 12,
"y": 28
@ -23944,7 +23944,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Data read/encode/deliver average duration",
"title": "Data Read/Encode/Deliver Average Duration",
"tooltip": {
"shared": true,
"sort": 0,
@ -24063,7 +24063,7 @@
]
},
"gridPos": {
"h": 8,
"h": 7,
"w": 12,
"x": 0,
"y": 36
@ -24092,7 +24092,7 @@
"refId": "A"
}
],
"title": "Import/Normal mode",
"title": "Import/Normal Mode",
"transformations": [
{
"id": "reduce",
@ -24129,7 +24129,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 1
@ -24237,7 +24237,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 1
@ -24341,7 +24341,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 7
@ -24449,7 +24449,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 7
@ -24559,7 +24559,7 @@
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 13
@ -24691,7 +24691,7 @@
"overrides": []
},
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 105
@ -24721,7 +24721,7 @@
"refId": "A"
}
],
"title": "Parallel upload worker count",
"title": "Parallel Upload Worker Count",
"type": "timeseries"
}
],

View File

@ -285,7 +285,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "RU Max (Max Cost During 20s Period)",
"title": "RU Max(Max Cost During 20s Period)",
"tooltip": {
"shared": true,
"sort": 0,
@ -2512,7 +2512,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "CPU Time by Priority",
"title": "CPU Time By Priority",
"tooltip": {
"shared": true,
"sort": 0,
@ -2598,7 +2598,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "CPU Quota Limit by Priority",
"title": "CPU Quota Limit By Priority",
"tooltip": {
"shared": true,
"sort": 0,
@ -2684,7 +2684,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "Tasks Wait QPS by Priority",
"title": "Tasks Wait QPS By Priority",
"tooltip": {
"shared": true,
"sort": 0,

View File

@ -227,7 +227,7 @@ local RUPanel = graphPanel.new(
);
local RUMaxPanel = graphPanel.new(
title="RU Max (Max Cost During 20s Period)",
title="RU Max(Max Cost During 20s Period)",
datasource=myDS,
legend_rightSide=true,
legend_current=true,
@ -823,7 +823,7 @@ local priorityTaskRow = row.new(collapse=true, title="Priority Task Control");
// The CPU time used of each priority
local PriorityTaskCPUPanel = graphPanel.new(
title="CPU Time by Priority",
title="CPU Time By Priority",
datasource=myDS,
legend_rightSide=true,
legend_current=true,
@ -841,7 +841,7 @@ local PriorityTaskCPUPanel = graphPanel.new(
// The CPU Limiter Quota of each priority
local PriorityTaskQuotaLimitPanel = graphPanel.new(
title="CPU Quota Limit by Priority",
title="CPU Quota Limit By Priority",
datasource=myDS,
legend_rightSide=true,
legend_current=true,
@ -859,7 +859,7 @@ local PriorityTaskQuotaLimitPanel = graphPanel.new(
// Task QPS that triggers wait
local PriorityTaskWaitQPSPanel = graphPanel.new(
title="Tasks Wait QPS by Priority",
title="Tasks Wait QPS By Priority",
datasource=myDS,
legend_rightSide=true,
legend_current=true,

View File

@ -597,7 +597,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "GC STW Duration (last 256 GC cycles)",
"title": "GC STW Duration: Last 256 GC Cycles",
"tooltip": {
"msResolution": false,
"shared": true,
@ -1537,7 +1537,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "goroutine scheduler latency",
"title": "Goroutine Scheduler Latency",
"tooltip": {
"msResolution": false,
"shared": true,
@ -1731,7 +1731,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "GC STW Latency(>= go1.22.0)",
"title": "GC STW Latency(>=go1.22.0)",
"tooltip": {
"msResolution": false,
"shared": true,
@ -2011,7 +2011,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "estimated portion of CPU time",
"title": "Estimated Portion Of CPU Time",
"tooltip": {
"msResolution": false,
"shared": true,
@ -2195,7 +2195,7 @@
],
"timeFrom": null,
"timeShift": null,
"title": "golang GC",
"title": "Golang GC",
"type": "timeseries"
},
{
@ -2272,7 +2272,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "sync mutex wait",
"title": "Sync Mutex Wait",
"tooltip": {
"msResolution": false,
"shared": true,
@ -2563,7 +2563,7 @@
],
"timeFrom": null,
"timeShift": null,
"title": "heap alloc",
"title": "Heap Alloc",
"type": "timeseries"
},
{
@ -2695,7 +2695,7 @@
],
"timeFrom": null,
"timeShift": null,
"title": "heap free",
"title": "Heap Free",
"type": "timeseries"
}
],

View File

@ -41,7 +41,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 0
@ -127,7 +127,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 0
@ -220,7 +220,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 0
@ -313,7 +313,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 0
@ -433,7 +433,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 0
@ -533,7 +533,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 0
@ -619,7 +619,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 0
@ -721,7 +721,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 0
@ -807,7 +807,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 0
@ -900,7 +900,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 0
@ -943,7 +943,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "CPS by CMD",
"title": "CPS By CMD",
"tooltip": {
"shared": true,
"sort": 0,
@ -1006,7 +1006,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 0
@ -1099,7 +1099,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 0
@ -1192,7 +1192,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 0
@ -1285,7 +1285,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 0
@ -1391,7 +1391,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 0
@ -1477,7 +1477,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 0
@ -1577,7 +1577,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 0,
"y": 0
@ -1663,7 +1663,7 @@
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 6,
"h": 7,
"w": 12,
"x": 12,
"y": 0

View File

@ -272,7 +272,7 @@ local qpsP = graphPanel.new(
);
local cpsByCMDP = graphPanel.new(
title='CPS by CMD',
title='CPS By CMD',
datasource=myDS,
legend_rightSide=true,
description='MySQL command statistics by command type. See https://dev.mysql.com/doc/internals/en/text-protocol.html and https://dev.mysql.com/doc/internals/en/prepared-statements.html',
@ -433,7 +433,7 @@ local maxTxnRetryP = graphPanel.new(
// Merge together.
local panelW = 12;
local panelH = 6;
local panelH = 7;
local rowW = 24;
local rowH = 1;

View File

@ -20,6 +20,8 @@ import (
"fmt"
"os"
"slices"
"strings"
"unicode"
)
type basicDashboard struct {
@ -27,10 +29,19 @@ type basicDashboard struct {
}
type panel struct {
ID int `json:"id"`
Panels []panel `json:"panels"`
ID int `json:"id"`
Panels []panel `json:"panels"`
Type string `json:"type"`
Title string `json:"title"`
Collapsed bool `json:"collapsed"`
Datasource string `json:"datasource"`
GridPos struct {
H int `json:"h"`
} `json:"gridPos"`
}
const rowType = "row"
// a small linter to check if there are duplicate panel IDs in a dashboard json file.
// grafana do have one linter https://github.com/grafana/dashboard-linter, but seems
// it does not have rules to check duplicate panel IDs.
@ -48,6 +59,7 @@ func main() {
if err = json.Unmarshal(content, &board); err != nil {
panic(err)
}
checkDashboardPanelFields(board)
allIDs := make(map[int]int, 1024)
for _, p := range board.Panels {
allIDs[p.ID]++
@ -101,3 +113,63 @@ func indexOfAny(content []byte, substrs []string) int {
}
return -1
}
func checkDashboardPanelFields(board basicDashboard) {
errors := make([]error, 0, 8)
for _, p := range board.Panels {
if errs := checkPanel(p); len(errs) > 0 {
errors = append(errors, errs...)
}
}
if len(errors) == 0 {
return
}
for _, e := range errors {
fmt.Println(e)
}
os.Exit(1)
}
func checkPanel(p panel) []error {
errors := make([]error, 0, 8)
if p.Type == rowType {
if !p.Collapsed {
errors = append(errors, fmt.Errorf("row panel %d should be collapsed", p.ID))
}
// panel can be nested once(as a row panel)
for _, sub := range p.Panels {
if errs := checkPanel(sub); len(errs) > 0 {
errors = append(errors, errs...)
}
}
return errors
}
// tools like TiUP use our grafana dashboard json files as templates.
if p.Datasource != "${DS_TEST-CLUSTER}" {
errors = append(errors, fmt.Errorf("panel %d has datasource %s, which is not ${DS_TEST-CLUSTER}", p.ID, p.Datasource))
}
if p.GridPos.H != 7 {
errors = append(errors, fmt.Errorf("we uses 7 as panel height to uniform UI appearance, panel %d has height %d", p.ID, p.GridPos.H))
}
if p.Title == "" {
errors = append(errors, fmt.Errorf("panel %d has empty title", p.ID))
}
// we capitalize every word in title, it doesn't follow english grammar, but
// we already use it in many places, so we follow the existing style, and
// check it here.
splits := strings.Split(p.Title, " ")
for _, w := range splits {
// ignore some punctuations, like '-'
if len(w) <= 1 {
continue
}
for _, c := range w {
if !unicode.IsUpper(c) && !unicode.IsDigit(c) {
errors = append(errors, fmt.Errorf("panel %d first char of words in title %s should be all be upper case or digit", p.ID, p.Title))
}
break
}
}
return errors
}