Skip to content

Commit

Permalink
metrics (ticdc): fix error metrics expression (#9648)
Browse files Browse the repository at this point in the history
close #9649
  • Loading branch information
asddongmen authored Sep 5, 2023
1 parent 5c03222 commit 63ffe68
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 15 deletions.
22 changes: 15 additions & 7 deletions metrics/grafana/TiCDC-Monitor-Summary.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -748,7 +748,7 @@
{
"from": "",
"id": 2,
"text": "Error",
"text": "Warning",
"to": "",
"type": 1,
"value": "1"
Expand Down Expand Up @@ -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
Expand Down
24 changes: 16 additions & 8 deletions metrics/grafana/ticdc.json
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,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,
Expand Down Expand Up @@ -3900,7 +3900,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": {
Expand Down Expand Up @@ -3939,7 +3939,7 @@
{
"from": "",
"id": 2,
"text": "Error",
"text": "Warning",
"to": "",
"type": 1,
"value": "1"
Expand Down Expand Up @@ -3971,22 +3971,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
Expand Down

0 comments on commit 63ffe68

Please sign in to comment.