Skip to content

Commit

Permalink
metrics: update tso metrics in micro service (#7873)
Browse files Browse the repository at this point in the history
close #5839

Signed-off-by: lhy1024 <[email protected]>

Co-authored-by: Hu# <[email protected]>
  • Loading branch information
lhy1024 and HuSharp authored Mar 6, 2024
1 parent 6a45734 commit e72d49b
Showing 1 changed file with 55 additions and 12 deletions.
67 changes: 55 additions & 12 deletions metrics/grafana/pd.json
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,7 @@
"steppedLine": false,
"targets": [
{
"expr": "irate(process_cpu_seconds_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*pd.*\"}[30s])",
"expr": "irate(process_cpu_seconds_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*(pd|tso|scheduling).*\"}[30s])",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
Expand All @@ -1819,7 +1819,7 @@
},
{
"exemplar": true,
"expr": "pd_service_maxprocs{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*pd.*\"}",
"expr": "pd_service_maxprocs{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*(pd|tso|scheduling).*\"}",
"hide": false,
"interval": "",
"legendFormat": "{{job}}-{{instance}}-limit",
Expand Down Expand Up @@ -1917,7 +1917,7 @@
"steppedLine": false,
"targets": [
{
"expr": "process_resident_memory_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*pd.*\"}",
"expr": "process_resident_memory_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*(pd|tso|scheduling).*\"}",
"format": "time_series",
"hide": false,
"interval": "",
Expand All @@ -1927,42 +1927,42 @@
"step": 4
},
{
"expr": "go_memstats_heap_sys_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*pd.*\"}",
"expr": "go_memstats_heap_sys_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*(pd|tso|scheduling).*\"}",
"hide": true,
"interval": "",
"legendFormat": "HeapSys-{{job}}-{{instance}}",
"refId": "B"
},
{
"expr": "go_memstats_heap_inuse_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*pd.*\"}",
"expr": "go_memstats_heap_inuse_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*(pd|tso|scheduling).*\"}",
"hide": false,
"interval": "",
"legendFormat": "HeapInuse-{{job}}-{{instance}}",
"refId": "C"
},
{
"expr": "go_memstats_heap_alloc_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*pd.*\"}",
"expr": "go_memstats_heap_alloc_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*(pd|tso|scheduling).*\"}",
"hide": true,
"interval": "",
"legendFormat": "HeapAlloc-{{job}}-{{instance}}",
"refId": "D"
},
{
"expr": "go_memstats_heap_idle_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*pd.*\"}",
"expr": "go_memstats_heap_idle_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*(pd|tso|scheduling).*\"}",
"hide": true,
"interval": "",
"legendFormat": "HeapIdle-{{job}}-{{instance}}",
"refId": "E"
},
{
"expr": "go_memstats_heap_released_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*pd.*\"}",
"expr": "go_memstats_heap_released_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*(pd|tso|scheduling).*\"}",
"hide": true,
"interval": "",
"legendFormat": "HeapReleased-{{job}}-{{instance}}",
"refId": "F"
},
{
"expr": "go_memstats_next_gc_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*pd.*\"}",
"expr": "go_memstats_next_gc_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*(pd|tso|scheduling).*\"}",
"hide": true,
"interval": "",
"legendFormat": "GCTrigger-{{job}}-{{instance}}",
Expand Down Expand Up @@ -2059,7 +2059,7 @@
"steppedLine": false,
"targets": [
{
"expr": "(time() - process_start_time_seconds{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*pd.*\"})",
"expr": "(time() - process_start_time_seconds{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*(pd|tso|scheduling).*\"})",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
Expand Down Expand Up @@ -2158,7 +2158,7 @@
"steppedLine": false,
"targets": [
{
"expr": "go_goroutines{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*pd.*\"}",
"expr": "go_goroutines{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",job=~\".*(pd|tso|scheduling).*\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
Expand Down Expand Up @@ -10618,6 +10618,40 @@
"intervalFactor": 1,
"legendFormat": "99.999% tso",
"refId": "D"
},
{
"expr": "histogram_quantile(0.90, sum(rate(tso_server_handle_tso_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[30s])) by (type, le))",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
"legendFormat": "90% tso",
"refId": "E",
"step": 2
},
{
"expr": "histogram_quantile(0.99, sum(rate(tso_server_handle_tso_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[30s])) by (type, le))",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
"legendFormat": "99% tso",
"refId": "F",
"step": 2
},
{
"expr": "histogram_quantile(0.999, sum(rate(tso_server_handle_tso_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[30s])) by (type, le))",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
"legendFormat": "99.9% tso",
"refId": "G",
"step": 2
},
{
"expr": "histogram_quantile(0.99999, sum(rate(tso_server_handle_tso_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[30s])) by (type, le))",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "99.999% tso",
"refId": "H"
}
],
"thresholds": [],
Expand Down Expand Up @@ -10830,6 +10864,15 @@
"hide": true,
"refId": "B",
"step": 2
},
{
"expr": "sum(rate(tso_server_handle_tso_duration_seconds_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (type)",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "tso request/secs",
"refId": "C",
"step": 2
}
],
"thresholds": [],
Expand Down Expand Up @@ -13590,4 +13633,4 @@
"title": "Test-Cluster-PD",
"uid": "Q6RuHYIWk",
"version": 1
}
}

0 comments on commit e72d49b

Please sign in to comment.