Skip to content

Commit

Permalink
Fix KoP dashboard (#78)
Browse files Browse the repository at this point in the history
### Motivation

Currently, In the KoP dashboard, some charts do not specify the default datasource. If we don't specify the default datasource, then Grafana can't automatically fetch the metrics.

### Modification

* Specify default datasource.
* The `version` and `iteration` are modify by Grafana web editor.

### Result

After this PR, KoP dashboard should be able to work for Grafana 8.3.6 or higher version.

(cherry picked from commit 18e4566)
  • Loading branch information
Demogorgon314 authored and ericsyh committed Jul 25, 2023
1 parent aeff611 commit a77122d
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 28 deletions.
95 changes: 81 additions & 14 deletions dashboards.template/kop.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "5.3.2"
"version": "8.3.6"
},
{
"type": "panel",
Expand Down Expand Up @@ -67,7 +67,7 @@
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"iteration": 1645690890250,
"iteration": 1646291925320,
"links": [],
"liveNow": true,
"panels": [
Expand All @@ -85,6 +85,10 @@
"type": "row"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -160,6 +164,10 @@
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -235,6 +243,10 @@
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -294,6 +306,10 @@
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -353,6 +369,10 @@
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"description": "",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -429,6 +449,10 @@
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"description": "",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -518,6 +542,10 @@
"type": "row"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -582,7 +610,8 @@
"placement": "bottom"
},
"tooltip": {
"mode": "single"
"mode": "single",
"sort": "none"
}
},
"targets": [
Expand All @@ -602,6 +631,10 @@
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -666,7 +699,8 @@
"placement": "bottom"
},
"tooltip": {
"mode": "single"
"mode": "single",
"sort": "none"
}
},
"targets": [
Expand All @@ -686,6 +720,10 @@
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -750,7 +788,8 @@
"placement": "bottom"
},
"tooltip": {
"mode": "single"
"mode": "single",
"sort": "none"
}
},
"targets": [
Expand All @@ -770,6 +809,10 @@
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -834,7 +877,8 @@
"placement": "bottom"
},
"tooltip": {
"mode": "single"
"mode": "single",
"sort": "none"
}
},
"targets": [
Expand All @@ -854,6 +898,10 @@
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -918,7 +966,8 @@
"placement": "bottom"
},
"tooltip": {
"mode": "single"
"mode": "single",
"sort": "none"
}
},
"targets": [
Expand All @@ -938,6 +987,10 @@
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1002,7 +1055,8 @@
"placement": "bottom"
},
"tooltip": {
"mode": "single"
"mode": "single",
"sort": "none"
}
},
"targets": [
Expand All @@ -1022,6 +1076,10 @@
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1086,7 +1144,8 @@
"placement": "bottom"
},
"tooltip": {
"mode": "single"
"mode": "single",
"sort": "none"
}
},
"targets": [
Expand All @@ -1106,6 +1165,10 @@
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1170,7 +1233,8 @@
"placement": "bottom"
},
"tooltip": {
"mode": "single"
"mode": "single",
"sort": "none"
}
},
"targets": [
Expand Down Expand Up @@ -2450,7 +2514,7 @@
}
],
"refresh": "5s",
"schemaVersion": 34,
"schemaVersion": 35,
"style": "dark",
"tags": [
"KoP"
Expand All @@ -2459,6 +2523,10 @@
"list": [
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "{{ PULSAR_CLUSTER }}"
},
"definition": "{job=~\".+\"}",
"hide": 0,
"includeAll": true,
Expand All @@ -2474,8 +2542,7 @@
"regex": "/.*[^_]job=\\\"([^\\\"]+)\\\".*/",
"skipUrlSync": false,
"sort": 1,
"type": "query",
"datasource": "{{ PULSAR_CLUSTER }}"
"type": "query"
},
{
"current": {},
Expand Down Expand Up @@ -2578,6 +2645,6 @@
"timezone": "",
"title": "Kafka on Pulsar (KoP)",
"uid": "_QjmaxB7k1",
"version": 10,
"version": 1,
"weekStart": ""
}
Loading

0 comments on commit a77122d

Please sign in to comment.