Skip to content

Commit

Permalink
Fixed dashboards to use kubernetes_pod_name labels (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat authored Jun 8, 2023
1 parent 062c5b1 commit 84f2668
Show file tree
Hide file tree
Showing 7 changed files with 552 additions and 530 deletions.
49 changes: 27 additions & 22 deletions deploy/dashboards/oxia-containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 148,
"links": [],
"liveNow": false,
"panels": [
Expand Down Expand Up @@ -539,7 +540,7 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.3.1",
"pluginVersion": "9.3.14",
"pointradius": 5,
"points": false,
"renderer": "flot",
Expand Down Expand Up @@ -623,7 +624,7 @@
}
}
],
"refresh": "",
"refresh": "30s",
"schemaVersion": 37,
"style": "dark",
"tags": [],
Expand All @@ -632,26 +633,26 @@
{
"current": {
"selected": false,
"text": "Prometheus",
"value": "Prometheus"
"text": "default",
"value": "default"
},
"hide": 0,
"includeAll": false,
"multi": false,
"name": "DataSource",
"options": [],
"query": "prometheus",
"queryValue": "ci",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"current": {
"isNone": true,
"selected": false,
"text": "None",
"value": ""
"text": "oxia",
"value": "oxia"
},
"datasource": {
"type": "prometheus",
Expand All @@ -677,8 +678,8 @@
{
"current": {
"selected": false,
"text": "monitoring",
"value": "monitoring"
"text": "oxia-test",
"value": "oxia-test"
},
"datasource": {
"type": "prometheus",
Expand All @@ -697,19 +698,19 @@
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "/.*namespace=\"([^\"]*).*/",
"regex": "/.*kubernetes_namespace=\"([^\"]*).*/",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": true,
"selected": false,
"text": [
"All"
"server"
],
"value": [
"$__all"
"server"
]
},
"datasource": {
Expand All @@ -728,42 +729,46 @@
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "/.*job=\"([^\"]*).*/",
"regex": "/.*app_kubernetes_io_component=\"([^\"]*).*/",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": false,
"text": "All",
"value": "$__all"
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "prometheus",
"uid": "${DataSource}"
"uid": "2p5DL6QVz"
},
"definition": "process_cpu_seconds_total{oxia_cluster=~\"$cluster\", job=~\"$component\", namespace=~\"$k8s_namespace\"}",
"definition": "process_cpu_seconds_total{oxia_cluster=~\"$cluster\", app_kubernetes_io_component=~\"$component\", kubernetes_namespace=~\"$k8s_namespace\"}",
"hide": 0,
"includeAll": true,
"label": "Pod",
"multi": true,
"name": "pod",
"options": [],
"query": {
"query": "process_cpu_seconds_total{oxia_cluster=~\"$cluster\", job=~\"$component\", namespace=~\"$k8s_namespace\"}",
"query": "process_cpu_seconds_total{oxia_cluster=~\"$cluster\", app_kubernetes_io_component=~\"$component\", kubernetes_namespace=~\"$k8s_namespace\"}",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "/.*pod=\"([^\"]*).*/",
"regex": "/.*kubernetes_pod_name=\"([^\"]*).*/",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-1h",
"from": "now-30m",
"to": "now"
},
"timepicker": {
Expand Down Expand Up @@ -794,6 +799,6 @@
"timezone": "browser",
"title": "Oxia - Containers Metrics",
"uid": "n8PAzdPazx",
"version": 1,
"version": 4,
"weekStart": ""
}
42 changes: 20 additions & 22 deletions deploy/dashboards/oxia-coordinator.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 149,
"links": [],
"liveNow": false,
"panels": [
Expand Down Expand Up @@ -195,8 +196,8 @@
"uid": "${DataSource}"
},
"editorMode": "code",
"expr": "sum by(shard) (rate(oxia_coordinator_leader_election_latency_milliseconds_count{oxia_cluster=~\"$cluster\", oxia_namespace=~\"$namespace\", shard=~\"$shard\"}[1m])) * 60",
"legendFormat": "{{namespace}}-{{shard}}",
"expr": "sum by(oxia_namespace, shard) (rate(oxia_coordinator_leader_election_latency_milliseconds_count{oxia_cluster=~\"$cluster\", oxia_namespace=~\"$namespace\", shard=~\"$shard\"}[1m])) * 60",
"legendFormat": "{{oxia_namespace}}-{{shard}}",
"range": true,
"refId": "A"
}
Expand Down Expand Up @@ -288,8 +289,8 @@
"uid": "${DataSource}"
},
"editorMode": "code",
"expr": "sum by (shard) (rate(oxia_coordinator_leader_election_failed_total_total{oxia_cluster=~\"$cluster\",oxia_namespace=~\"$namespace\", shard=~\"$shard\"}[1m]) * 60)",
"legendFormat": "{{shard}}",
"expr": "sum by (oxia_namespace, shard) (rate(oxia_coordinator_leader_election_failed_total{oxia_cluster=~\"$cluster\",oxia_namespace=~\"$namespace\", shard=~\"$shard\"}[1m]) * 60)",
"legendFormat": "{{oxia_namespace}} - {{shard}}",
"range": true,
"refId": "A"
}
Expand Down Expand Up @@ -383,7 +384,7 @@
"uid": "${DataSource}"
},
"editorMode": "code",
"expr": "histogram_quantile(0.50, sum(oxia_coordinator_leader_election_latency_milliseconds_bucket{oxia_cluster=~\"$cluster\", oxia_namespace=~\"$namespace\", shard=~\"$shard\"}) by (le, shard))",
"expr": "histogram_quantile(0.50, sum(oxia_coordinator_leader_election_latency_milliseconds_bucket{oxia_cluster=~\"$cluster\", oxia_namespace=~\"$namespace\", shard=~\"$shard\"}) by (le, shard, oxia_namespace))",
"legendFormat": "{{oxia_namespace}}-{{shard}}",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -478,8 +479,8 @@
"uid": "${DataSource}"
},
"editorMode": "code",
"expr": "histogram_quantile(0.99, sum(oxia_coordinator_leader_election_latency_milliseconds_bucket{oxia_cluster=~\"$cluster\", oxia_namespace=~\"$namespace\", shard=~\"$shard\"}) by (le, shard))",
"legendFormat": "{{shard}}",
"expr": "histogram_quantile(0.99, sum(oxia_coordinator_leader_election_latency_milliseconds_bucket{oxia_cluster=~\"$cluster\", oxia_namespace=~\"$namespace\", shard=~\"$shard\"}) by (le, shard, oxia_namespace))",
"legendFormat": "{{oxia_namespace}} - {{shard}}",
"range": true,
"refId": "A"
}
Expand Down Expand Up @@ -573,8 +574,8 @@
"uid": "${DataSource}"
},
"editorMode": "code",
"expr": "histogram_quantile(0.999, sum(oxia_coordinator_leader_election_latency_milliseconds_bucket{oxia_cluster=~\"$cluster\", oxia_namespace=~\"$namespace\", shard=~\"$shard\"}) by (le, shard))",
"legendFormat": "{{shard}}",
"expr": "histogram_quantile(0.999, sum(oxia_coordinator_leader_election_latency_milliseconds_bucket{oxia_cluster=~\"$cluster\", oxia_namespace=~\"$namespace\", shard=~\"$shard\"}) by (le, shard, oxia_namespace))",
"legendFormat": "{{oxia_namespace}} - {{shard}}",
"range": true,
"refId": "A"
}
Expand Down Expand Up @@ -830,8 +831,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down Expand Up @@ -925,8 +925,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down Expand Up @@ -1019,8 +1018,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down Expand Up @@ -1094,8 +1092,8 @@
{
"current": {
"selected": false,
"text": "my-oxia-cluster",
"value": "my-oxia-cluster"
"text": "oxia",
"value": "oxia"
},
"datasource": {
"type": "prometheus",
Expand All @@ -1120,12 +1118,12 @@
},
{
"current": {
"selected": true,
"selected": false,
"text": [
"All"
"matteo"
],
"value": [
"$__all"
"matteo"
]
},
"datasource": {
Expand All @@ -1151,7 +1149,7 @@
},
{
"current": {
"selected": true,
"selected": false,
"text": [
"All"
],
Expand Down Expand Up @@ -1190,6 +1188,6 @@
"timezone": "",
"title": "Oxia - Coordinator",
"uid": "tfvR1o24k",
"version": 1,
"version": 3,
"weekStart": ""
}
Loading

0 comments on commit 84f2668

Please sign in to comment.