Skip to content

Commit

Permalink
metrics: update TiKV metrics #1604 (#1607)
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Shen <[email protected]>
  • Loading branch information
amyangfei authored Apr 2, 2021
1 parent 35a6d8b commit 39c1bd9
Showing 1 changed file with 233 additions and 12 deletions.
245 changes: 233 additions & 12 deletions metrics/grafana/ticdc.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"datasource": "${DS_TEST-CLUSTER}",
"enable": true,
"expr": "min(up{tidb_cluster=\"$tidb_cluster\", job=~\"tikv|ticdc\"}) by (job, instance) == BOOL 0",
"hide": true,
"hide": false,
"iconColor": "#FF9830",
"limit": 100,
"name": "Server down",
Expand Down Expand Up @@ -109,7 +109,7 @@
"gnetId": null,
"graphTooltip": 1,
"id": null,
"iteration": 1617089343502,
"iteration": 1617365191337,
"links": [],
"panels": [
{
Expand Down Expand Up @@ -5389,7 +5389,7 @@
"fill": 1,
"gridPos": {
"h": 7,
"w": 12,
"w": 6,
"x": 12,
"y": 19
},
Expand All @@ -5402,7 +5402,7 @@
"hideZero": true,
"max": true,
"min": false,
"rightSide": true,
"rightSide": false,
"show": true,
"sideWidth": null,
"sort": "current",
Expand Down Expand Up @@ -5473,6 +5473,115 @@
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_TEST-CLUSTER}",
"decimals": 1,
"description": "The number of incremental scan task in different status.",
"fill": 1,
"gridPos": {
"h": 7,
"w": 6,
"x": 18,
"y": 19
},
"id": 140,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"hideEmpty": false,
"hideZero": true,
"max": true,
"min": false,
"rightSide": false,
"show": true,
"sideWidth": null,
"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": [
{
"alias": "/.*ongoing/",
"yaxis": 2
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(tikv_cdc_scan_tasks{tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\"}) by (type, instance)",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"legendFormat": "{{instance}} - {{type}}",
"refId": "A"
},
{
"expr": "sum(tikv_cdc_scan_tasks{tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", type=\"total\"}) by (instance) - sum(tikv_cdc_scan_tasks{tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", type=\"finish\"}) by (instance) - sum(tikv_cdc_scan_tasks{tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", type=\"abort\"}) by (instance)",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"legendFormat": "{{instance}} - ongoing",
"refId": "B"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Initial scan tasks status",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "none",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "none",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
Expand Down Expand Up @@ -5597,7 +5706,7 @@
"dashes": false,
"datasource": "${DS_TEST-CLUSTER}",
"decimals": 1,
"description": "The memory usage per TiKV instance",
"description": "The speed of TiKV CDC incremental scan",
"editable": true,
"error": false,
"fill": 0,
Expand All @@ -5613,6 +5722,8 @@
"alignAsTable": true,
"avg": false,
"current": true,
"hideEmpty": true,
"hideZero": true,
"max": true,
"min": false,
"rightSide": true,
Expand All @@ -5638,9 +5749,9 @@
"steppedLine": false,
"targets": [
{
"expr": "avg(tikv_cdc_min_resolved_ts{tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", job=\"tikv\"}) by (instance)",
"expr": "sum(rate(tikv_cdc_scan_bytes_total{tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", job=\"tikv\"}[30s])) by (instance)",
"format": "time_series",
"hide": true,
"hide": false,
"intervalFactor": 2,
"legendFormat": "tikv-{{instance}}",
"refId": "A",
Expand All @@ -5651,7 +5762,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "CDC pending bytes in memory",
"title": "CDC scan speed",
"tooltip": {
"msResolution": false,
"shared": true,
Expand All @@ -5672,7 +5783,7 @@
"label": null,
"logBase": 1,
"max": null,
"min": null,
"min": "0",
"show": true
},
{
Expand Down Expand Up @@ -5741,9 +5852,18 @@
"format": "time_series",
"hide": false,
"intervalFactor": 2,
"legendFormat": "tikv-{{instance}}",
"legendFormat": "tikv-{{instance}}-total",
"refId": "A",
"step": 10
},
{
"expr": "sum(tikv_cdc_region_resolve_status{tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\"}) by (instance, status)",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
"legendFormat": "tikv-{{instance}}-{{status}}",
"refId": "B",
"step": 10
}
],
"thresholds": [],
Expand Down Expand Up @@ -5787,6 +5907,107 @@
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": true,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_TEST-CLUSTER}",
"decimals": 1,
"description": "The total bytes of TiKV CDC incremental scan",
"editable": true,
"error": false,
"fill": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 33
},
"id": 139,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"hideEmpty": true,
"hideZero": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"sideWidth": null,
"sort": "current",
"sortDesc": true,
"total": false,
"values": true
},
"lines": false,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"paceLength": 10,
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(tikv_cdc_scan_bytes_total{tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", job=\"tikv\"}) by (instance)",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
"legendFormat": "tikv-{{instance}}",
"refId": "A",
"step": 10
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "CDC total scan bytes",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"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
}
}
],
"title": "TiKV",
Expand Down Expand Up @@ -5974,5 +6195,5 @@
"timezone": "browser",
"title": "Test-Cluster-TiCDC",
"uid": "YiGL8hBZ1",
"version": 13
}
"version": 14
}

0 comments on commit 39c1bd9

Please sign in to comment.