diff --git a/pkg/metrics/grafana/tidb.json b/pkg/metrics/grafana/tidb.json index 7ab7d8f049bf5..fd189ef9838b0 100644 --- a/pkg/metrics/grafana/tidb.json +++ b/pkg/metrics/grafana/tidb.json @@ -3093,7 +3093,7 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_TEST-CLUSTER}", - "description": "TiDB connection disconnected counts", + "description": "TiDB connection disconnected counts per result (cumulative); right axis adds an ok/error disconnect rate view, and routes the undetermined cumulative counter to its own scale since any occurrence needs investigation", "editable": true, "error": false, "fieldConfig": { @@ -3139,6 +3139,16 @@ "alias": "total", "fill": 0, "lines": false + }, + { + "alias": "/-undetermined$/", + "stack": false, + "yaxis": 2 + }, + { + "alias": "/-rate$/", + "stack": false, + "yaxis": 2 } ], "spaceLength": 10, @@ -3152,6 +3162,14 @@ "legendFormat": "{{instance}}-{{result}}", "refId": "A", "step": 40 + }, + { + "expr": "sum(irate(tidb_server_disconnection_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", result!=\"undetermined\"}[30s])) by (instance, result)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}-{{result}}-rate", + "refId": "B", + "step": 40 } ], "thresholds": [], diff --git a/pkg/metrics/nextgengrafana/tidb_with_keyspace_name.json b/pkg/metrics/nextgengrafana/tidb_with_keyspace_name.json index 0b1ee09b5b917..9c1af1a77862c 100644 --- a/pkg/metrics/nextgengrafana/tidb_with_keyspace_name.json +++ b/pkg/metrics/nextgengrafana/tidb_with_keyspace_name.json @@ -3259,7 +3259,7 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_TEST-CLUSTER}", - "description": "TiDB connection disconnected counts", + "description": "TiDB connection disconnected counts per result (cumulative); right axis adds an ok/error disconnect rate view, and routes the undetermined cumulative counter to its own scale since any occurrence needs investigation", "editable": true, "error": false, "fieldConfig": { @@ -3305,6 +3305,16 @@ "alias": "total", "fill": 0, "lines": false + }, + { + "alias": "/-undetermined$/", + "stack": false, + "yaxis": 2 + }, + { + "alias": "/-rate$/", + "stack": false, + "yaxis": 2 } ], "spaceLength": 10, @@ -3318,6 +3328,14 @@ "legendFormat": "{{instance}}-{{result}}", "refId": "A", "step": 40 + }, + { + "expr": "sum(irate(tidb_server_disconnection_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", keyspace_name=~\"$keyspace_name\", instance=~\"$instance\", result!=\"undetermined\"}[30s])) by (instance, result)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}-{{result}}-rate", + "refId": "B", + "step": 40 } ], "thresholds": [], diff --git a/pkg/metrics/nextgengrafana/tidb_worker.json b/pkg/metrics/nextgengrafana/tidb_worker.json index 2ff5d338ccd5a..437aed0c14a05 100644 --- a/pkg/metrics/nextgengrafana/tidb_worker.json +++ b/pkg/metrics/nextgengrafana/tidb_worker.json @@ -3259,7 +3259,7 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_TEST-CLUSTER}", - "description": "TiDB connection disconnected counts", + "description": "TiDB connection disconnected counts per result (cumulative); right axis adds an ok/error disconnect rate view, and routes the undetermined cumulative counter to its own scale since any occurrence needs investigation", "editable": true, "error": false, "fieldConfig": { @@ -3305,6 +3305,16 @@ "alias": "total", "fill": 0, "lines": false + }, + { + "alias": "/-undetermined$/", + "stack": false, + "yaxis": 2 + }, + { + "alias": "/-rate$/", + "stack": false, + "yaxis": 2 } ], "spaceLength": 10, @@ -3318,6 +3328,14 @@ "legendFormat": "{{instance}}-{{result}}", "refId": "A", "step": 40 + }, + { + "expr": "sum(irate(tidb_server_disconnection_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", result!=\"undetermined\"}[30s])) by (instance, result)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}-{{result}}-rate", + "refId": "B", + "step": 40 } ], "thresholds": [],