Skip to content

Commit

Permalink
metrics: modify hot grafana panel (tikv#6802)
Browse files Browse the repository at this point in the history
close tikv#4350

1. devide Hot `Select event` into `Select read event` and `Select write event`
2. add new panel to show the `hot write bytes of the leader region`

Signed-off-by: bufferflies <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
  • Loading branch information
bufferflies and ti-chi-bot[bot] committed Jul 14, 2023
1 parent a621fcb commit 5728238
Showing 1 changed file with 208 additions and 6 deletions.
214 changes: 208 additions & 6 deletions metrics/grafana/pd.json
Original file line number Diff line number Diff line change
Expand Up @@ -5136,6 +5136,111 @@
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_TEST-CLUSTER}",
"decimals": 2,
"description": "The total keys of hot write on leader Regions for each TiKV instance",
"fill": 0,
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 31
},
"id": 1465,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"hideEmpty": true,
"hideZero": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"sort": "current",
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "null",
"paceLength": 10,
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "pd_hotspot_status{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", store=~\"$store\", instance=\"$instance\", type=\"total_write_bytes_as_leader\"}",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{address}}-store-{{store}}",
"metric": "pd_hotspot_status",
"refId": "A",
"step": 4
},
{
"exemplar": true,
"expr": "pd_scheduler_hot_peers_summary{type=\"exp-byte-rate-write-leader\"}",
"hide": true,
"interval": "",
"legendFormat": "exp-byte-rate-write-leader-{{store}}",
"refId": "B"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Total written bytes on hot leader Regions",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"decimals": null,
"format": "ops",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
Expand Down Expand Up @@ -5260,7 +5365,7 @@
"h": 7,
"w": 12,
"x": 12,
"y": 31
"y": 38
},
"id": 1445,
"legend": {
Expand Down Expand Up @@ -5454,12 +5559,13 @@
"dashes": false,
"datasource": "${DS_TEST-CLUSTER}",
"decimals": 0,
"description": "The select events of hot read scheduler",
"fill": 0,
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 38
"y": 45
},
"id": 106,
"legend": {
Expand Down Expand Up @@ -5492,7 +5598,7 @@
"steppedLine": false,
"targets": [
{
"expr": "rate(pd_scheduler_hot_region{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", store=~\"$store\", type=~\".*store.*\"}[1m])",
"expr": "rate(pd_scheduler_hot_region{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", store=~\"$store\", type=~\".*write.*\"}[1m])",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{type}}-{{store}}",
Expand All @@ -5504,7 +5610,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Selector events",
"title": "Selector write events",
"tooltip": {
"shared": true,
"sort": 0,
Expand Down Expand Up @@ -5656,7 +5762,7 @@
"h": 7,
"w": 12,
"x": 12,
"y": 45
"y": 52
},
"id": 148,
"legend": {
Expand Down Expand Up @@ -6737,6 +6843,102 @@
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_TEST-CLUSTER}",
"decimals": 0,
"description": "The select events of hot read scheduler",
"fill": 0,
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 81
},
"id": 1466,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"hideEmpty": true,
"hideZero": true,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"sort": "current",
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"paceLength": 10,
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rate(pd_scheduler_hot_region{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", store=~\"$store\", type=~\".*read.*\"}[1m])",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{type}}-{{store}}",
"refId": "A",
"step": 4
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Selector read events",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"decimals": null,
"format": "none",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"repeat": null,
Expand Down Expand Up @@ -11964,7 +12166,7 @@
"x": 12,
"y": 48
},
"id": 1455,
"id": 1467,
"interval": "",
"options": {
"displayMode": "lcd",
Expand Down

0 comments on commit 5728238

Please sign in to comment.