From b681e6136944ef7f69af0fc995826b92729e944e Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Tue, 19 Sep 2023 12:22:42 +0800 Subject: [PATCH] metrics (ticdc): fix error metrics expression (#9648) (#9684) close pingcap/tiflow#9649 --- metrics/grafana/TiCDC-Monitor-Summary.json | 22 +++++++++++++------- metrics/grafana/ticdc.json | 24 ++++++++++++++-------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/metrics/grafana/TiCDC-Monitor-Summary.json b/metrics/grafana/TiCDC-Monitor-Summary.json index 86cee1692ae..ca88ea213e3 100644 --- a/metrics/grafana/TiCDC-Monitor-Summary.json +++ b/metrics/grafana/TiCDC-Monitor-Summary.json @@ -709,7 +709,7 @@ }, { "datasource": "${DS_TEST-CLUSTER}", - "description": "The status of each changefeed.\n\n0: Normal\n\n1: Error\n\n2: Failed\n\n3: Stopped\n\n4: Finished\n\n-1: Unknown", + "description": "The status of each changefeed.\n\n0: Normal\n\n1 and 6: Warning\n\n2: Failed\n\n3: Stopped\n\n4: Finished\n\n-1: Unknown", "fieldConfig": { "defaults": { "color": { @@ -748,7 +748,7 @@ { "from": "", "id": 2, - "text": "Error", + "text": "Warning", "to": "", "type": 1, "value": "1" @@ -780,22 +780,30 @@ { "from": "", "id": 6, + "text": "Warning", + "to": "", + "type": 1, + "value": "6" + }, + { + "from": "", + "id": 7, "text": "Unknown", "to": "", "type": 1, "value": "-1" }, { - "from": "5", - "id": 7, + "from": "7", + "id": 8, "text": "Other", "to": "10000", "type": 1, - "value": "5" + "value": "7" }, { - "from": "6", - "id": 8, + "from": "7", + "id": 9, "text": "-", "to": "1000", "type": 2 diff --git a/metrics/grafana/ticdc.json b/metrics/grafana/ticdc.json index 791fa80f62d..6be8d5d5f0a 100644 --- a/metrics/grafana/ticdc.json +++ b/metrics/grafana/ticdc.json @@ -1063,7 +1063,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(increase(tikv_cdc_scan_duration_seconds_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\"}[1m])) by (type, instance)", + "expr": "sum(increase(tikv_cdc_scan_tasks{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\"}[1m])) by (type, instance)", "format": "time_series", "hide": false, "intervalFactor": 1, @@ -3889,7 +3889,7 @@ }, { "datasource": "${DS_TEST-CLUSTER}", - "description": "The status of each changefeed.\n\n0: Normal\n\n1: Error\n\n2: Failed\n\n3: Stopped\n\n4: Finished\n\n-1: Unknown", + "description": "The status of each changefeed.\n\n0: Normal\n\n1 and 6: Warning\n\n2: Failed\n\n3: Stopped\n\n4: Finished\n\n-1: Unknown", "fieldConfig": { "defaults": { "color": { @@ -3928,7 +3928,7 @@ { "from": "", "id": 2, - "text": "Error", + "text": "Warning", "to": "", "type": 1, "value": "1" @@ -3960,22 +3960,30 @@ { "from": "", "id": 6, + "text": "Warning", + "to": "", + "type": 1, + "value": "6" + }, + { + "from": "", + "id": 7, "text": "Unknown", "to": "", "type": 1, "value": "-1" }, { - "from": "5", - "id": 7, + "from": "7", + "id": 8, "text": "Other", "to": "10000", "type": 1, - "value": "5" + "value": "7" }, { - "from": "6", - "id": 8, + "from": "7", + "id": 9, "text": "-", "to": "1000", "type": 2