github.com/pingcap/tidb-lightning@v5.0.0-rc.0.20210428090220-84b649866577+incompatible/metrics/grafana/lightning.json (about)

     1  {
     2    "__inputs": [
     3      {
     4        "name": "DS_LIGHTNING",
     5        "label": "lightning",
     6        "description": "",
     7        "type": "datasource",
     8        "pluginId": "prometheus",
     9        "pluginName": "Prometheus"
    10      }
    11    ],
    12    "__requires": [
    13      {
    14        "type": "grafana",
    15        "id": "grafana",
    16        "name": "Grafana",
    17        "version": "4.6.3"
    18      },
    19      {
    20        "type": "panel",
    21        "id": "graph",
    22        "name": "Graph",
    23        "version": ""
    24      },
    25      {
    26        "type": "datasource",
    27        "id": "prometheus",
    28        "name": "Prometheus",
    29        "version": "1.0.0"
    30      },
    31      {
    32        "type": "panel",
    33        "id": "singlestat",
    34        "name": "Singlestat",
    35        "version": ""
    36      },
    37      {
    38        "type": "panel",
    39        "id": "table",
    40        "name": "Table",
    41        "version": ""
    42      }
    43    ],
    44    "annotations": {
    45      "list": [
    46        {
    47          "builtIn": 1,
    48          "datasource": "-- Grafana --",
    49          "enable": true,
    50          "hide": true,
    51          "iconColor": "rgba(0, 211, 255, 1)",
    52          "name": "Annotations & Alerts",
    53          "type": "dashboard"
    54        }
    55      ]
    56    },
    57    "editable": true,
    58    "gnetId": null,
    59    "graphTooltip": 0,
    60    "hideControls": false,
    61    "id": null,
    62    "links": [],
    63    "refresh": false,
    64    "rows": [
    65      {
    66        "collapse": false,
    67        "height": "250px",
    68        "panels": [
    69          {
    70            "aliasColors": {},
    71            "bars": false,
    72            "dashLength": 10,
    73            "dashes": false,
    74            "datasource": "${DS_LIGHTNING}",
    75            "fill": 1,
    76            "id": 1,
    77            "legend": {
    78              "alignAsTable": false,
    79              "avg": false,
    80              "current": false,
    81              "max": false,
    82              "min": false,
    83              "rightSide": false,
    84              "show": true,
    85              "total": false,
    86              "values": false
    87            },
    88            "lines": true,
    89            "linewidth": 1,
    90            "links": [],
    91            "nullPointMode": "null",
    92            "percentage": false,
    93            "pointradius": 5,
    94            "points": false,
    95            "renderer": "flot",
    96            "seriesOverrides": [],
    97            "spaceLength": 10,
    98            "span": 6,
    99            "stack": false,
   100            "steppedLine": false,
   101            "targets": [
   102              {
   103                "expr": "rate(tikv_import_write_chunk_bytes_sum{tidb_cluster=\"$tidb_cluster\"}[1m])",
   104                "format": "time_series",
   105                "intervalFactor": 2,
   106                "legendFormat": "write from lightning",
   107                "refId": "B"
   108              },
   109              {
   110                "expr": "sum(rate(tikv_import_upload_chunk_bytes_sum{tidb_cluster=\"$tidb_cluster\"}[1m]))",
   111                "format": "time_series",
   112                "intervalFactor": 2,
   113                "legendFormat": "upload to tikv",
   114                "refId": "C"
   115              }
   116            ],
   117            "thresholds": [],
   118            "timeFrom": null,
   119            "timeShift": null,
   120            "title": "Import speed",
   121            "tooltip": {
   122              "shared": true,
   123              "sort": 0,
   124              "value_type": "individual"
   125            },
   126            "type": "graph",
   127            "xaxis": {
   128              "buckets": null,
   129              "mode": "time",
   130              "name": null,
   131              "show": true,
   132              "values": []
   133            },
   134            "yaxes": [
   135              {
   136                "format": "Bps",
   137                "label": null,
   138                "logBase": 1,
   139                "max": null,
   140                "min": "0",
   141                "show": true
   142              },
   143              {
   144                "format": "none",
   145                "label": null,
   146                "logBase": 1,
   147                "max": null,
   148                "min": null,
   149                "show": true
   150              }
   151            ]
   152          },
   153          {
   154            "aliasColors": {},
   155            "bars": false,
   156            "dashLength": 10,
   157            "dashes": false,
   158            "datasource": "${DS_LIGHTNING}",
   159            "fill": 1,
   160            "id": 10,
   161            "legend": {
   162              "avg": false,
   163              "current": false,
   164              "max": false,
   165              "min": false,
   166              "show": false,
   167              "total": false,
   168              "values": false
   169            },
   170            "lines": true,
   171            "linewidth": 1,
   172            "links": [],
   173            "nullPointMode": "null",
   174            "percentage": false,
   175            "pointradius": 5,
   176            "points": false,
   177            "renderer": "flot",
   178            "seriesOverrides": [],
   179            "spaceLength": 10,
   180            "span": 6,
   181            "stack": false,
   182            "steppedLine": false,
   183            "targets": [
   184              {
   185                "expr": "1/rate(lightning_chunks{tidb_cluster=\"$tidb_cluster\", state=\"finished\"}[1m]) ",
   186                "format": "time_series",
   187                "intervalFactor": 2,
   188                "legendFormat": "",
   189                "refId": "A"
   190              }
   191            ],
   192            "thresholds": [],
   193            "timeFrom": null,
   194            "timeShift": null,
   195            "title": "Chunk process duration",
   196            "tooltip": {
   197              "shared": true,
   198              "sort": 0,
   199              "value_type": "individual"
   200            },
   201            "type": "graph",
   202            "xaxis": {
   203              "buckets": null,
   204              "mode": "time",
   205              "name": null,
   206              "show": true,
   207              "values": []
   208            },
   209            "yaxes": [
   210              {
   211                "format": "s",
   212                "label": "",
   213                "logBase": 1,
   214                "max": null,
   215                "min": "0",
   216                "show": true
   217              },
   218              {
   219                "format": "short",
   220                "label": "",
   221                "logBase": 1,
   222                "max": null,
   223                "min": null,
   224                "show": true
   225              }
   226            ]
   227          }
   228        ],
   229        "repeat": null,
   230        "repeatIteration": null,
   231        "repeatRowId": null,
   232        "showTitle": false,
   233        "title": "Import Speed",
   234        "titleSize": "h6"
   235      },
   236      {
   237        "collapse": false,
   238        "height": 250,
   239        "panels": [
   240          {
   241            "cacheTimeout": null,
   242            "colorBackground": false,
   243            "colorValue": false,
   244            "colors": [
   245              "#d44a3a",
   246              "rgba(237, 129, 40, 0.89)",
   247              "#299c46"
   248            ],
   249            "datasource": "${DS_LIGHTNING}",
   250            "decimals": null,
   251            "format": "percentunit",
   252            "gauge": {
   253              "maxValue": 1,
   254              "minValue": 0,
   255              "show": true,
   256              "thresholdLabels": false,
   257              "thresholdMarkers": false
   258            },
   259            "id": 4,
   260            "interval": null,
   261            "links": [],
   262            "mappingType": 1,
   263            "mappingTypes": [
   264              {
   265                "name": "value to text",
   266                "value": 1
   267              },
   268              {
   269                "name": "range to text",
   270                "value": 2
   271              }
   272            ],
   273            "maxDataPoints": 100,
   274            "nullPointMode": "connected",
   275            "nullText": null,
   276            "postfix": "",
   277            "postfixFontSize": "50%",
   278            "prefix": "",
   279            "prefixFontSize": "50%",
   280            "rangeMaps": [
   281              {
   282                "from": "null",
   283                "text": "N/A",
   284                "to": "null"
   285              }
   286            ],
   287            "span": 3,
   288            "sparkline": {
   289              "fillColor": "rgba(31, 118, 189, 0.18)",
   290              "full": true,
   291              "lineColor": "rgb(31, 120, 193)",
   292              "show": false
   293            },
   294            "tableColumn": "",
   295            "targets": [
   296              {
   297                "expr": "lightning_chunks{tidb_cluster=\"$tidb_cluster\", state=\"finished\"} / ignoring(state) lightning_chunks{tidb_cluster=\"$tidb_cluster\", state=\"estimated\"}",
   298                "format": "time_series",
   299                "instant": false,
   300                "intervalFactor": 2,
   301                "refId": "A"
   302              }
   303            ],
   304            "thresholds": "0,0",
   305            "title": "Import Progress",
   306            "type": "singlestat",
   307            "valueFontSize": "80%",
   308            "valueMaps": [
   309              {
   310                "op": "=",
   311                "text": "N/A",
   312                "value": "null"
   313              }
   314            ],
   315            "valueName": "current"
   316          },
   317          {
   318            "cacheTimeout": null,
   319            "colorBackground": false,
   320            "colorValue": false,
   321            "colors": [
   322              "#d44a3a",
   323              "rgba(237, 129, 40, 0.89)",
   324              "#299c46"
   325            ],
   326            "datasource": "${DS_LIGHTNING}",
   327            "format": "percentunit",
   328            "gauge": {
   329              "maxValue": 1,
   330              "minValue": 0,
   331              "show": true,
   332              "thresholdLabels": false,
   333              "thresholdMarkers": false
   334            },
   335            "id": 12,
   336            "interval": null,
   337            "links": [],
   338            "mappingType": 1,
   339            "mappingTypes": [
   340              {
   341                "name": "value to text",
   342                "value": 1
   343              },
   344              {
   345                "name": "range to text",
   346                "value": 2
   347              }
   348            ],
   349            "maxDataPoints": 100,
   350            "nullPointMode": "connected",
   351            "nullText": null,
   352            "postfix": "",
   353            "postfixFontSize": "50%",
   354            "prefix": "",
   355            "prefixFontSize": "50%",
   356            "rangeMaps": [
   357              {
   358                "from": "null",
   359                "text": "N/A",
   360                "to": "null"
   361              }
   362            ],
   363            "span": 3,
   364            "sparkline": {
   365              "fillColor": "rgba(31, 118, 189, 0.18)",
   366              "full": false,
   367              "lineColor": "rgb(31, 120, 193)",
   368              "show": false
   369            },
   370            "tableColumn": "",
   371            "targets": [
   372              {
   373                "expr": "lightning_tables{tidb_cluster=\"$tidb_cluster\", state=\"completed\"} / ignoring(state) lightning_tables{tidb_cluster=\"$tidb_cluster\", state=\"pending\"}",
   374                "format": "time_series",
   375                "instant": false,
   376                "intervalFactor": 1,
   377                "refId": "A"
   378              }
   379            ],
   380            "thresholds": "0,0",
   381            "title": "Checksum progress",
   382            "type": "singlestat",
   383            "valueFontSize": "80%",
   384            "valueMaps": [
   385              {
   386                "op": "=",
   387                "text": "N/A",
   388                "value": "null"
   389              }
   390            ],
   391            "valueName": "avg"
   392          },
   393          {
   394            "columns": [
   395              {
   396                "text": "Max",
   397                "value": "max"
   398              }
   399            ],
   400            "datasource": "${DS_LIGHTNING}",
   401            "fontSize": "100%",
   402            "id": 8,
   403            "links": [],
   404            "pageSize": null,
   405            "scroll": true,
   406            "showHeader": true,
   407            "sort": {
   408              "col": 0,
   409              "desc": true
   410            },
   411            "span": 6,
   412            "styles": [
   413              {
   414                "alias": "Time",
   415                "dateFormat": "YYYY-MM-DD HH:mm:ss",
   416                "pattern": "Time",
   417                "type": "date"
   418              },
   419              {
   420                "alias": "Step",
   421                "colorMode": "cell",
   422                "colors": [
   423                  "rgba(50, 172, 45, 0.97)",
   424                  "rgba(237, 129, 40, 0.89)",
   425                  "rgba(245, 54, 54, 0.9)"
   426                ],
   427                "decimals": 0,
   428                "pattern": "Metric",
   429                "thresholds": [
   430                  "1",
   431                  "2"
   432                ],
   433                "type": "number",
   434                "unit": "none"
   435              },
   436              {
   437                "alias": "Tables",
   438                "colorMode": "cell",
   439                "colors": [
   440                  "rgba(50, 172, 45, 0.97)",
   441                  "rgba(237, 129, 40, 0.89)",
   442                  "rgba(245, 54, 54, 0.9)"
   443                ],
   444                "dateFormat": "YYYY-MM-DD HH:mm:ss",
   445                "decimals": 0,
   446                "pattern": "Max",
   447                "thresholds": [
   448                  "0",
   449                  "0"
   450                ],
   451                "type": "number",
   452                "unit": "none"
   453              }
   454            ],
   455            "targets": [
   456              {
   457                "expr": "lightning_tables{tidb_cluster=\"$tidb_cluster\", result=\"failure\"}",
   458                "format": "time_series",
   459                "instant": false,
   460                "intervalFactor": 2,
   461                "legendFormat": "{{state}}",
   462                "refId": "A"
   463              }
   464            ],
   465            "title": "Failures",
   466            "transform": "timeseries_aggregations",
   467            "type": "table"
   468          }
   469        ],
   470        "repeat": null,
   471        "repeatIteration": null,
   472        "repeatRowId": null,
   473        "showTitle": false,
   474        "title": "Import Progress",
   475        "titleSize": "h6"
   476      },
   477      {
   478        "collapse": false,
   479        "height": 250,
   480        "panels": [
   481          {
   482            "aliasColors": {},
   483            "bars": false,
   484            "dashLength": 10,
   485            "dashes": false,
   486            "datasource": "${DS_LIGHTNING}",
   487            "fill": 1,
   488            "id": 7,
   489            "legend": {
   490              "avg": false,
   491              "current": false,
   492              "max": false,
   493              "min": false,
   494              "show": true,
   495              "total": false,
   496              "values": false
   497            },
   498            "lines": true,
   499            "linewidth": 1,
   500            "links": [],
   501            "nullPointMode": "null",
   502            "percentage": false,
   503            "pointradius": 5,
   504            "points": false,
   505            "renderer": "flot",
   506            "seriesOverrides": [],
   507            "spaceLength": 10,
   508            "span": 4,
   509            "stack": false,
   510            "steppedLine": false,
   511            "targets": [
   512              {
   513                "expr": "process_resident_memory_bytes{tidb_cluster=\"$tidb_cluster\", job=\"tikv-importer\"}",
   514                "format": "time_series",
   515                "intervalFactor": 2,
   516                "legendFormat": "importer RSS",
   517                "refId": "A"
   518              },
   519              {
   520                "expr": "go_memstats_heap_inuse_bytes{tidb_cluster=\"$tidb_cluster\", job=\"lightning\"}",
   521                "format": "time_series",
   522                "intervalFactor": 2,
   523                "legendFormat": "lightning heap",
   524                "refId": "B"
   525              }
   526            ],
   527            "thresholds": [],
   528            "timeFrom": null,
   529            "timeShift": null,
   530            "title": "Memory usage",
   531            "tooltip": {
   532              "shared": true,
   533              "sort": 0,
   534              "value_type": "individual"
   535            },
   536            "type": "graph",
   537            "xaxis": {
   538              "buckets": null,
   539              "mode": "time",
   540              "name": null,
   541              "show": true,
   542              "values": []
   543            },
   544            "yaxes": [
   545              {
   546                "format": "bytes",
   547                "label": null,
   548                "logBase": 1,
   549                "max": null,
   550                "min": "0",
   551                "show": true
   552              },
   553              {
   554                "format": "short",
   555                "label": null,
   556                "logBase": 1,
   557                "max": null,
   558                "min": null,
   559                "show": true
   560              }
   561            ]
   562          },
   563          {
   564            "aliasColors": {},
   565            "bars": false,
   566            "dashLength": 10,
   567            "dashes": false,
   568            "datasource": "${DS_LIGHTNING}",
   569            "fill": 1,
   570            "id": 9,
   571            "legend": {
   572              "avg": false,
   573              "current": false,
   574              "max": false,
   575              "min": false,
   576              "show": false,
   577              "total": false,
   578              "values": false
   579            },
   580            "lines": true,
   581            "linewidth": 1,
   582            "links": [],
   583            "nullPointMode": "null",
   584            "percentage": false,
   585            "pointradius": 5,
   586            "points": false,
   587            "renderer": "flot",
   588            "seriesOverrides": [],
   589            "spaceLength": 10,
   590            "span": 4,
   591            "stack": false,
   592            "steppedLine": false,
   593            "targets": [
   594              {
   595                "expr": "go_goroutines{tidb_cluster=\"$tidb_cluster\", job=\"lightning\"}",
   596                "format": "time_series",
   597                "instant": false,
   598                "intervalFactor": 2,
   599                "legendFormat": "",
   600                "refId": "A"
   601              }
   602            ],
   603            "thresholds": [],
   604            "timeFrom": null,
   605            "timeShift": null,
   606            "title": "Number of Lightning Goroutines",
   607            "tooltip": {
   608              "shared": true,
   609              "sort": 0,
   610              "value_type": "individual"
   611            },
   612            "type": "graph",
   613            "xaxis": {
   614              "buckets": null,
   615              "mode": "time",
   616              "name": null,
   617              "show": true,
   618              "values": []
   619            },
   620            "yaxes": [
   621              {
   622                "decimals": 0,
   623                "format": "short",
   624                "label": null,
   625                "logBase": 1,
   626                "max": null,
   627                "min": "0",
   628                "show": true
   629              },
   630              {
   631                "format": "short",
   632                "label": null,
   633                "logBase": 1,
   634                "max": null,
   635                "min": null,
   636                "show": true
   637              }
   638            ]
   639          },
   640          {
   641            "aliasColors": {},
   642            "bars": false,
   643            "dashLength": 10,
   644            "dashes": false,
   645            "datasource": "${DS_LIGHTNING}",
   646            "fill": 1,
   647            "id": 3,
   648            "legend": {
   649              "alignAsTable": false,
   650              "avg": true,
   651              "current": false,
   652              "max": false,
   653              "min": false,
   654              "rightSide": false,
   655              "show": true,
   656              "total": false,
   657              "values": true
   658            },
   659            "lines": true,
   660            "linewidth": 1,
   661            "links": [],
   662            "nullPointMode": "null",
   663            "percentage": false,
   664            "pointradius": 5,
   665            "points": false,
   666            "renderer": "flot",
   667            "seriesOverrides": [],
   668            "spaceLength": 10,
   669            "span": 4,
   670            "stack": false,
   671            "steppedLine": false,
   672            "targets": [
   673              {
   674                "expr": "rate(process_cpu_seconds_total{tidb_cluster=\"$tidb_cluster\", job=\"lightning\"}[30s])*100",
   675                "format": "time_series",
   676                "intervalFactor": 2,
   677                "legendFormat": "Lightning",
   678                "refId": "A"
   679              },
   680              {
   681                "expr": "rate(process_cpu_seconds_total{tidb_cluster=\"$tidb_cluster\", job=\"tikv-importer\"}[30s])*100",
   682                "format": "time_series",
   683                "intervalFactor": 2,
   684                "legendFormat": "Importer",
   685                "refId": "B"
   686              }
   687            ],
   688            "thresholds": [],
   689            "timeFrom": null,
   690            "timeShift": null,
   691            "title": "CPU%",
   692            "tooltip": {
   693              "shared": true,
   694              "sort": 0,
   695              "value_type": "individual"
   696            },
   697            "type": "graph",
   698            "xaxis": {
   699              "buckets": null,
   700              "mode": "time",
   701              "name": null,
   702              "show": true,
   703              "values": []
   704            },
   705            "yaxes": [
   706              {
   707                "decimals": null,
   708                "format": "percent",
   709                "label": null,
   710                "logBase": 1,
   711                "max": null,
   712                "min": "0",
   713                "show": true
   714              },
   715              {
   716                "format": "short",
   717                "label": null,
   718                "logBase": 1,
   719                "max": null,
   720                "min": null,
   721                "show": true
   722              }
   723            ]
   724          }
   725        ],
   726        "repeat": null,
   727        "repeatIteration": null,
   728        "repeatRowId": null,
   729        "showTitle": false,
   730        "title": "Resource usage",
   731        "titleSize": "h6"
   732      },
   733      {
   734        "collapse": false,
   735        "height": 250,
   736        "panels": [
   737          {
   738            "aliasColors": {},
   739            "bars": false,
   740            "dashLength": 10,
   741            "dashes": false,
   742            "datasource": "${DS_LIGHTNING}",
   743            "fill": 1,
   744            "id": 5,
   745            "legend": {
   746              "avg": false,
   747              "current": false,
   748              "max": false,
   749              "min": false,
   750              "show": true,
   751              "total": false,
   752              "values": false
   753            },
   754            "lines": true,
   755            "linewidth": 1,
   756            "links": [],
   757            "nullPointMode": "null",
   758            "percentage": false,
   759            "pointradius": 5,
   760            "points": false,
   761            "renderer": "flot",
   762            "seriesOverrides": [],
   763            "spaceLength": 10,
   764            "span": 5,
   765            "stack": false,
   766            "steppedLine": true,
   767            "targets": [
   768              {
   769                "expr": "lightning_idle_workers{tidb_cluster=\"$tidb_cluster\"}",
   770                "format": "time_series",
   771                "intervalFactor": 2,
   772                "legendFormat": "{{name}}",
   773                "refId": "A"
   774              }
   775            ],
   776            "thresholds": [],
   777            "timeFrom": null,
   778            "timeShift": null,
   779            "title": "Idle workers",
   780            "tooltip": {
   781              "shared": true,
   782              "sort": 0,
   783              "value_type": "individual"
   784            },
   785            "type": "graph",
   786            "xaxis": {
   787              "buckets": null,
   788              "mode": "time",
   789              "name": null,
   790              "show": true,
   791              "values": []
   792            },
   793            "yaxes": [
   794              {
   795                "decimals": 0,
   796                "format": "none",
   797                "label": null,
   798                "logBase": 1,
   799                "max": null,
   800                "min": "0",
   801                "show": true
   802              },
   803              {
   804                "format": "short",
   805                "label": null,
   806                "logBase": 1,
   807                "max": null,
   808                "min": null,
   809                "show": true
   810              }
   811            ]
   812          },
   813          {
   814            "aliasColors": {},
   815            "bars": false,
   816            "dashLength": 10,
   817            "dashes": false,
   818            "datasource": "${DS_LIGHTNING}",
   819            "fill": 1,
   820            "id": 6,
   821            "legend": {
   822              "avg": false,
   823              "current": false,
   824              "max": false,
   825              "min": false,
   826              "show": true,
   827              "total": false,
   828              "values": false
   829            },
   830            "lines": true,
   831            "linewidth": 1,
   832            "links": [],
   833            "nullPointMode": "null",
   834            "percentage": false,
   835            "pointradius": 5,
   836            "points": false,
   837            "renderer": "flot",
   838            "seriesOverrides": [],
   839            "spaceLength": 10,
   840            "span": 5,
   841            "stack": false,
   842            "steppedLine": true,
   843            "targets": [
   844              {
   845                "expr": "lightning_kv_encoder{tidb_cluster=\"$tidb_cluster\", type=\"open\"} - ignoring(type) lightning_kv_encoder{tidb_cluster=\"$tidb_cluster\", type=\"closed\"}",
   846                "format": "time_series",
   847                "intervalFactor": 2,
   848                "legendFormat": "KV Encoder",
   849                "refId": "A"
   850              },
   851              {
   852                "expr": "lightning_importer_engine{tidb_cluster=\"$tidb_cluster\", type=\"open\"} - ignoring(type) lightning_importer_engine{tidb_cluster=\"$tidb_cluster\", type=\"closed\"}",
   853                "format": "time_series",
   854                "intervalFactor": 2,
   855                "legendFormat": "Importer Engines (via Lightning)",
   856                "refId": "B"
   857              },
   858              {
   859                "expr": "tikv_import_rpc_duration_count{tidb_cluster=\"$tidb_cluster\", request=\"open_engine\",result=\"ok\"} - ignoring(request) tikv_import_rpc_duration_count{tidb_cluster=\"$tidb_cluster\", request=\"close_engine\",result=\"ok\"}",
   860                "format": "time_series",
   861                "intervalFactor": 2,
   862                "legendFormat": "Importer Engines (via Importer)",
   863                "refId": "C"
   864              }
   865            ],
   866            "thresholds": [],
   867            "timeFrom": null,
   868            "timeShift": null,
   869            "title": "External resources",
   870            "tooltip": {
   871              "shared": true,
   872              "sort": 0,
   873              "value_type": "individual"
   874            },
   875            "type": "graph",
   876            "xaxis": {
   877              "buckets": null,
   878              "mode": "time",
   879              "name": null,
   880              "show": true,
   881              "values": []
   882            },
   883            "yaxes": [
   884              {
   885                "decimals": 0,
   886                "format": "none",
   887                "label": null,
   888                "logBase": 1,
   889                "max": null,
   890                "min": "0",
   891                "show": true
   892              },
   893              {
   894                "format": "short",
   895                "label": null,
   896                "logBase": 1,
   897                "max": null,
   898                "min": null,
   899                "show": true
   900              }
   901            ]
   902          },
   903          {
   904            "columns": [
   905              {
   906                "text": "Current",
   907                "value": "current"
   908              }
   909            ],
   910            "datasource": "${DS_LIGHTNING}",
   911            "fontSize": "100%",
   912            "id": 21,
   913            "links": [],
   914            "pageSize": null,
   915            "scroll": true,
   916            "showHeader": true,
   917            "sort": {
   918              "col": 0,
   919              "desc": true
   920            },
   921            "span": 2,
   922            "styles": [
   923              {
   924                "alias": "TiKV",
   925                "pattern": "Metric"
   926              },
   927              {
   928                "alias": "",
   929                "colorMode": "cell",
   930                "colors": [
   931                  "#E0B400",
   932                  "rgba(237, 129, 40, 0.89)",
   933                  "rgba(50, 172, 45, 0.97)"
   934                ],
   935                "decimals": 2,
   936                "link": false,
   937                "mappingType": 2,
   938                "pattern": "Current",
   939                "rangeMaps": [
   940                  {
   941                    "from": "0",
   942                    "text": "Import",
   943                    "to": "0"
   944                  },
   945                  {
   946                    "from": "1",
   947                    "text": "Normal",
   948                    "to": "Infinity"
   949                  }
   950                ],
   951                "thresholds": [
   952                  "1",
   953                  "1"
   954                ],
   955                "type": "string",
   956                "unit": "short"
   957              }
   958            ],
   959            "targets": [
   960              {
   961                "expr": "min(tikv_config_rocksdb{tidb_cluster=\"$tidb_cluster\", name=\"hard_pending_compaction_bytes_limit\"}) by (instance)",
   962                "format": "time_series",
   963                "instant": false,
   964                "intervalFactor": 2,
   965                "legendFormat": "{{instance}}",
   966                "refId": "A"
   967              }
   968            ],
   969            "title": "Import/Normal mode",
   970            "transform": "timeseries_aggregations",
   971            "type": "table"
   972          }
   973        ],
   974        "repeat": null,
   975        "repeatIteration": null,
   976        "repeatRowId": null,
   977        "showTitle": false,
   978        "title": "Resource usage",
   979        "titleSize": "h6"
   980      },
   981      {
   982        "collapse": false,
   983        "height": 223,
   984        "panels": [
   985          {
   986            "aliasColors": {},
   987            "bars": false,
   988            "dashLength": 10,
   989            "dashes": false,
   990            "datasource": "${DS_LIGHTNING}",
   991            "fill": 1,
   992            "id": 13,
   993            "legend": {
   994              "avg": false,
   995              "current": false,
   996              "max": false,
   997              "min": false,
   998              "show": true,
   999              "total": false,
  1000              "values": false
  1001            },
  1002            "lines": true,
  1003            "linewidth": 1,
  1004            "links": [],
  1005            "nullPointMode": "null",
  1006            "percentage": false,
  1007            "pointradius": 5,
  1008            "points": false,
  1009            "renderer": "flot",
  1010            "seriesOverrides": [],
  1011            "spaceLength": 10,
  1012            "span": 6,
  1013            "stack": false,
  1014            "steppedLine": false,
  1015            "targets": [
  1016              {
  1017                "expr": "rate(lightning_chunk_parser_read_block_seconds_sum{tidb_cluster=\"$tidb_cluster\"}[30s]) / rate(lightning_chunk_parser_read_block_seconds_count{tidb_cluster=\"$tidb_cluster\"}[30s])",
  1018                "format": "time_series",
  1019                "intervalFactor": 2,
  1020                "legendFormat": "read block",
  1021                "refId": "A"
  1022              },
  1023              {
  1024                "expr": "rate(lightning_apply_worker_seconds_sum{tidb_cluster=\"$tidb_cluster\", name = \"io\"}[30s]) /rate(lightning_apply_worker_seconds_count{tidb_cluster=\"$tidb_cluster\", name = \"io\"}[30s]) ",
  1025                "format": "time_series",
  1026                "intervalFactor": 2,
  1027                "legendFormat": "apply worker",
  1028                "refId": "B"
  1029              }
  1030            ],
  1031            "thresholds": [],
  1032            "timeFrom": null,
  1033            "timeShift": null,
  1034            "title": "Chunk parser read block duration",
  1035            "tooltip": {
  1036              "shared": true,
  1037              "sort": 0,
  1038              "value_type": "individual"
  1039            },
  1040            "type": "graph",
  1041            "xaxis": {
  1042              "buckets": null,
  1043              "mode": "time",
  1044              "name": null,
  1045              "show": true,
  1046              "values": []
  1047            },
  1048            "yaxes": [
  1049              {
  1050                "format": "s",
  1051                "label": null,
  1052                "logBase": 1,
  1053                "max": null,
  1054                "min": null,
  1055                "show": true
  1056              },
  1057              {
  1058                "format": "short",
  1059                "label": null,
  1060                "logBase": 1,
  1061                "max": null,
  1062                "min": null,
  1063                "show": true
  1064              }
  1065            ]
  1066          },
  1067          {
  1068            "aliasColors": {},
  1069            "bars": false,
  1070            "dashLength": 10,
  1071            "dashes": false,
  1072            "datasource": "${DS_LIGHTNING}",
  1073            "fill": 1,
  1074            "id": 15,
  1075            "legend": {
  1076              "avg": false,
  1077              "current": false,
  1078              "max": false,
  1079              "min": false,
  1080              "show": true,
  1081              "total": false,
  1082              "values": false
  1083            },
  1084            "lines": true,
  1085            "linewidth": 1,
  1086            "links": [],
  1087            "nullPointMode": "null",
  1088            "percentage": false,
  1089            "pointradius": 5,
  1090            "points": false,
  1091            "renderer": "flot",
  1092            "seriesOverrides": [],
  1093            "spaceLength": 10,
  1094            "span": 6,
  1095            "stack": false,
  1096            "steppedLine": false,
  1097            "targets": [
  1098              {
  1099                "expr": "rate(lightning_row_encode_seconds_sum{tidb_cluster=\"$tidb_cluster\"}[30s]) / rate(lightning_row_encode_seconds_count{tidb_cluster=\"$tidb_cluster\"}[30s])",
  1100                "format": "time_series",
  1101                "intervalFactor": 2,
  1102                "legendFormat": "row encode",
  1103                "refId": "A"
  1104              },
  1105              {
  1106                "expr": "rate(lightning_block_deliver_seconds_sum{tidb_cluster=\"$tidb_cluster\"}[30s]) / rate(lightning_block_deliver_seconds_count{tidb_cluster=\"$tidb_cluster\"}[30s])",
  1107                "format": "time_series",
  1108                "intervalFactor": 2,
  1109                "legendFormat": "block deliver",
  1110                "refId": "C"
  1111              }
  1112            ],
  1113            "thresholds": [],
  1114            "timeFrom": null,
  1115            "timeShift": null,
  1116            "title": "SQL process duration",
  1117            "tooltip": {
  1118              "shared": true,
  1119              "sort": 0,
  1120              "value_type": "individual"
  1121            },
  1122            "type": "graph",
  1123            "xaxis": {
  1124              "buckets": null,
  1125              "mode": "time",
  1126              "name": null,
  1127              "show": true,
  1128              "values": []
  1129            },
  1130            "yaxes": [
  1131              {
  1132                "format": "s",
  1133                "label": null,
  1134                "logBase": 2,
  1135                "max": null,
  1136                "min": null,
  1137                "show": true
  1138              },
  1139              {
  1140                "format": "short",
  1141                "label": null,
  1142                "logBase": 1,
  1143                "max": null,
  1144                "min": null,
  1145                "show": true
  1146              }
  1147            ]
  1148          }
  1149        ],
  1150        "repeat": null,
  1151        "repeatIteration": null,
  1152        "repeatRowId": null,
  1153        "showTitle": false,
  1154        "title": "Dashboard Row",
  1155        "titleSize": "h6"
  1156      },
  1157      {
  1158        "collapse": false,
  1159        "height": 235,
  1160        "panels": [
  1161          {
  1162            "aliasColors": {},
  1163            "bars": false,
  1164            "dashLength": 10,
  1165            "dashes": false,
  1166            "datasource": "${DS_LIGHTNING}",
  1167            "fill": 1,
  1168            "id": 16,
  1169            "legend": {
  1170              "avg": false,
  1171              "current": false,
  1172              "max": false,
  1173              "min": false,
  1174              "show": true,
  1175              "total": false,
  1176              "values": false
  1177            },
  1178            "lines": true,
  1179            "linewidth": 1,
  1180            "links": [],
  1181            "nullPointMode": "null",
  1182            "percentage": false,
  1183            "pointradius": 5,
  1184            "points": false,
  1185            "renderer": "flot",
  1186            "seriesOverrides": [],
  1187            "spaceLength": 10,
  1188            "span": 6,
  1189            "stack": false,
  1190            "steppedLine": false,
  1191            "targets": [
  1192              {
  1193                "expr": "rate(lightning_block_deliver_bytes_sum{tidb_cluster=\"$tidb_cluster\"}[30s])",
  1194                "format": "time_series",
  1195                "intervalFactor": 2,
  1196                "legendFormat": "{{kind}} deliver rate",
  1197                "refId": "B"
  1198              },
  1199              {
  1200                "expr": "sum(rate(lightning_block_deliver_bytes_sum{tidb_cluster=\"$tidb_cluster\"}[30s]))",
  1201                "format": "time_series",
  1202                "intervalFactor": 2,
  1203                "legendFormat": "total deliver rate",
  1204                "refId": "A"
  1205              }
  1206            ],
  1207            "thresholds": [],
  1208            "timeFrom": null,
  1209            "timeShift": null,
  1210            "title": "SQL process rate",
  1211            "tooltip": {
  1212              "shared": true,
  1213              "sort": 0,
  1214              "value_type": "individual"
  1215            },
  1216            "type": "graph",
  1217            "xaxis": {
  1218              "buckets": null,
  1219              "mode": "time",
  1220              "name": null,
  1221              "show": true,
  1222              "values": []
  1223            },
  1224            "yaxes": [
  1225              {
  1226                "format": "Bps",
  1227                "label": null,
  1228                "logBase": 1,
  1229                "max": null,
  1230                "min": null,
  1231                "show": true
  1232              },
  1233              {
  1234                "format": "short",
  1235                "label": null,
  1236                "logBase": 1,
  1237                "max": null,
  1238                "min": null,
  1239                "show": true
  1240              }
  1241            ]
  1242          },
  1243          {
  1244            "aliasColors": {},
  1245            "bars": false,
  1246            "dashLength": 10,
  1247            "dashes": false,
  1248            "datasource": "${DS_LIGHTNING}",
  1249            "fill": 1,
  1250            "id": 17,
  1251            "legend": {
  1252              "avg": false,
  1253              "current": false,
  1254              "max": false,
  1255              "min": false,
  1256              "show": true,
  1257              "total": false,
  1258              "values": false
  1259            },
  1260            "lines": true,
  1261            "linewidth": 1,
  1262            "links": [],
  1263            "nullPointMode": "null",
  1264            "percentage": false,
  1265            "pointradius": 5,
  1266            "points": false,
  1267            "renderer": "flot",
  1268            "seriesOverrides": [],
  1269            "spaceLength": 10,
  1270            "span": 6,
  1271            "stack": false,
  1272            "steppedLine": false,
  1273            "targets": [
  1274              {
  1275                "expr": "lightning_row_read_bytes_sum{tidb_cluster=\"$tidb_cluster\"}",
  1276                "format": "time_series",
  1277                "intervalFactor": 2,
  1278                "legendFormat": "parser read size",
  1279                "refId": "A"
  1280              },
  1281              {
  1282                "expr": "lightning_block_deliver_bytes_sum{tidb_cluster=\"$tidb_cluster\"}",
  1283                "format": "time_series",
  1284                "intervalFactor": 2,
  1285                "legendFormat": "{{kind}} deliver size",
  1286                "refId": "B"
  1287              },
  1288              {
  1289                "expr": "pd_cluster_status{tidb_cluster=\"$tidb_cluster\", type=\"storage_size\"} / ignoring(type) pd_config_status{tidb_cluster=\"$tidb_cluster\", type=\"max_replicas\"}",
  1290                "format": "time_series",
  1291                "intervalFactor": 2,
  1292                "legendFormat": "storage_size / replicas",
  1293                "refId": "C"
  1294              }
  1295            ],
  1296            "thresholds": [],
  1297            "timeFrom": null,
  1298            "timeShift": null,
  1299            "title": "Total bytes",
  1300            "tooltip": {
  1301              "shared": true,
  1302              "sort": 0,
  1303              "value_type": "individual"
  1304            },
  1305            "type": "graph",
  1306            "xaxis": {
  1307              "buckets": null,
  1308              "mode": "time",
  1309              "name": null,
  1310              "show": true,
  1311              "values": []
  1312            },
  1313            "yaxes": [
  1314              {
  1315                "format": "decbytes",
  1316                "label": null,
  1317                "logBase": 1,
  1318                "max": null,
  1319                "min": null,
  1320                "show": true
  1321              },
  1322              {
  1323                "format": "short",
  1324                "label": null,
  1325                "logBase": 1,
  1326                "max": null,
  1327                "min": null,
  1328                "show": true
  1329              }
  1330            ]
  1331          }
  1332        ],
  1333        "repeat": null,
  1334        "repeatIteration": null,
  1335        "repeatRowId": null,
  1336        "showTitle": false,
  1337        "title": "Dashboard Row",
  1338        "titleSize": "h6"
  1339      },
  1340      {
  1341        "collapse": false,
  1342        "height": 243,
  1343        "panels": [
  1344          {
  1345            "aliasColors": {},
  1346            "bars": false,
  1347            "dashLength": 10,
  1348            "dashes": false,
  1349            "datasource": "${DS_LIGHTNING}",
  1350            "fill": 1,
  1351            "id": 18,
  1352            "legend": {
  1353              "avg": false,
  1354              "current": false,
  1355              "max": false,
  1356              "min": false,
  1357              "show": true,
  1358              "total": false,
  1359              "values": false
  1360            },
  1361            "lines": true,
  1362            "linewidth": 1,
  1363            "links": [],
  1364            "nullPointMode": "null",
  1365            "percentage": false,
  1366            "pointradius": 5,
  1367            "points": false,
  1368            "renderer": "flot",
  1369            "seriesOverrides": [],
  1370            "spaceLength": 10,
  1371            "span": 6,
  1372            "stack": false,
  1373            "steppedLine": false,
  1374            "targets": [
  1375              {
  1376                "expr": "rate(tikv_import_range_delivery_duration_sum{tidb_cluster=\"$tidb_cluster\"}[30s]) / rate(tikv_import_range_delivery_duration_count{tidb_cluster=\"$tidb_cluster\"}[30s])",
  1377                "format": "time_series",
  1378                "intervalFactor": 2,
  1379                "legendFormat": "range deliver",
  1380                "refId": "A"
  1381              },
  1382              {
  1383                "expr": "rate(tikv_import_sst_delivery_duration_sum{tidb_cluster=\"$tidb_cluster\"}[30s]) / rate(tikv_import_sst_delivery_duration_count{tidb_cluster=\"$tidb_cluster\"}[30s])",
  1384                "format": "time_series",
  1385                "intervalFactor": 2,
  1386                "legendFormat": "SST file deliver",
  1387                "refId": "B"
  1388              }
  1389            ],
  1390            "thresholds": [],
  1391            "timeFrom": null,
  1392            "timeShift": null,
  1393            "title": "Deliver duration",
  1394            "tooltip": {
  1395              "shared": true,
  1396              "sort": 0,
  1397              "value_type": "individual"
  1398            },
  1399            "type": "graph",
  1400            "xaxis": {
  1401              "buckets": null,
  1402              "mode": "time",
  1403              "name": null,
  1404              "show": true,
  1405              "values": []
  1406            },
  1407            "yaxes": [
  1408              {
  1409                "format": "s",
  1410                "label": null,
  1411                "logBase": 1,
  1412                "max": null,
  1413                "min": null,
  1414                "show": true
  1415              },
  1416              {
  1417                "format": "short",
  1418                "label": null,
  1419                "logBase": 1,
  1420                "max": null,
  1421                "min": null,
  1422                "show": true
  1423              }
  1424            ]
  1425          },
  1426          {
  1427            "aliasColors": {},
  1428            "bars": false,
  1429            "dashLength": 10,
  1430            "dashes": false,
  1431            "datasource": "${DS_LIGHTNING}",
  1432            "fill": 1,
  1433            "id": 19,
  1434            "legend": {
  1435              "avg": false,
  1436              "current": false,
  1437              "max": false,
  1438              "min": false,
  1439              "rightSide": false,
  1440              "show": true,
  1441              "total": false,
  1442              "values": false
  1443            },
  1444            "lines": true,
  1445            "linewidth": 1,
  1446            "links": [],
  1447            "nullPointMode": "null",
  1448            "percentage": false,
  1449            "pointradius": 5,
  1450            "points": false,
  1451            "renderer": "flot",
  1452            "seriesOverrides": [
  1453              {
  1454                "alias": "SST size",
  1455                "yaxis": 2
  1456              }
  1457            ],
  1458            "spaceLength": 10,
  1459            "span": 6,
  1460            "stack": false,
  1461            "steppedLine": false,
  1462            "targets": [
  1463              {
  1464                "expr": "rate(tikv_import_split_sst_duration_sum{tidb_cluster=\"$tidb_cluster\"}[30s]) / rate(tikv_import_split_sst_duration_count{tidb_cluster=\"$tidb_cluster\"}[30s])",
  1465                "format": "time_series",
  1466                "intervalFactor": 2,
  1467                "legendFormat": "Split SST",
  1468                "refId": "C"
  1469              },
  1470              {
  1471                "expr": "rate(tikv_import_sst_upload_duration_sum{tidb_cluster=\"$tidb_cluster\"}[30s]) / rate(tikv_import_sst_upload_duration_count{tidb_cluster=\"$tidb_cluster\"}[30s])",
  1472                "format": "time_series",
  1473                "interval": "",
  1474                "intervalFactor": 2,
  1475                "legendFormat": "SST upload",
  1476                "refId": "D"
  1477              },
  1478              {
  1479                "expr": "rate(tikv_import_sst_ingest_duration_sum{tidb_cluster=\"$tidb_cluster\"}[30s]) / rate(tikv_import_sst_ingest_duration_count{tidb_cluster=\"$tidb_cluster\"}[30s])",
  1480                "format": "time_series",
  1481                "instant": false,
  1482                "intervalFactor": 2,
  1483                "legendFormat": "SST ingest",
  1484                "refId": "E"
  1485              },
  1486              {
  1487                "expr": "rate(tikv_import_sst_chunk_bytes_sum{tidb_cluster=\"$tidb_cluster\"}[30s])",
  1488                "format": "time_series",
  1489                "intervalFactor": 2,
  1490                "legendFormat": "SST size",
  1491                "refId": "A"
  1492              }
  1493            ],
  1494            "thresholds": [],
  1495            "timeFrom": null,
  1496            "timeShift": null,
  1497            "title": "SST process duration",
  1498            "tooltip": {
  1499              "shared": true,
  1500              "sort": 0,
  1501              "value_type": "individual"
  1502            },
  1503            "type": "graph",
  1504            "xaxis": {
  1505              "buckets": null,
  1506              "mode": "time",
  1507              "name": null,
  1508              "show": true,
  1509              "values": []
  1510            },
  1511            "yaxes": [
  1512              {
  1513                "format": "s",
  1514                "label": null,
  1515                "logBase": 1,
  1516                "max": null,
  1517                "min": null,
  1518                "show": true
  1519              },
  1520              {
  1521                "format": "decbytes",
  1522                "label": null,
  1523                "logBase": 1,
  1524                "max": null,
  1525                "min": null,
  1526                "show": true
  1527              }
  1528            ]
  1529          }
  1530        ],
  1531        "repeat": null,
  1532        "repeatIteration": null,
  1533        "repeatRowId": null,
  1534        "showTitle": false,
  1535        "title": "Dashboard Row",
  1536        "titleSize": "h6"
  1537      }
  1538    ],
  1539    "schemaVersion": 14,
  1540    "style": "dark",
  1541    "tags": [],
  1542    "templating": {
  1543      "list": [
  1544        {
  1545          "allValue": null,
  1546          "current": {
  1547          },
  1548          "datasource": "${DS_TEST-CLUSTER}",
  1549          "hide": 2,
  1550          "includeAll": false,
  1551          "label": "tidb_cluster",
  1552          "multi": false,
  1553          "name": "tidb_cluster",
  1554          "options": [
  1555  
  1556          ],
  1557          "query": "label_values(lightning_chunks, tidb_cluster)",
  1558          "refresh": 2,
  1559          "regex": "",
  1560          "sort": 1,
  1561          "tagValuesQuery": "",
  1562          "tags": [
  1563  
  1564          ],
  1565          "tagsQuery": "",
  1566          "type": "query",
  1567          "useTags": false
  1568        }
  1569      ]
  1570    },
  1571    "time": {
  1572      "from": "now-6h",
  1573      "to": "now"
  1574    },
  1575    "timepicker": {
  1576      "refresh_intervals": [
  1577        "5s",
  1578        "10s",
  1579        "30s",
  1580        "1m",
  1581        "5m",
  1582        "15m",
  1583        "30m",
  1584        "1h",
  1585        "2h",
  1586        "1d"
  1587      ],
  1588      "time_options": [
  1589        "5m",
  1590        "15m",
  1591        "1h",
  1592        "6h",
  1593        "12h",
  1594        "24h",
  1595        "2d",
  1596        "7d",
  1597        "30d"
  1598      ]
  1599    },
  1600    "timezone": "browser",
  1601    "title": "Test-Cluster-Lightning",
  1602    "version": 4
  1603  }