From b350854106eed794114fbd3ab0c528991596e99a Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 06:59:04 -0800 Subject: [PATCH 01/19] Update mongo dashboards Signed-off-by: Tamal Saha --- .../mongodb-database-replset-dashboard.json | 23 +++++++-- .../mongodb/mongodb-pod-dashboard.json | 33 +++++++++---- .../mongodb/mongodb-summary-dashboard.json | 48 ++++++++++++------- .../templates/configmap.yaml | 23 +++++++++ .../templates/dashboard.yaml | 6 ++- .../templates/job.yaml | 43 +++++++++++++++++ charts/kubedb-grafana-dashboards/values.yaml | 18 ++++--- 7 files changed, 157 insertions(+), 37 deletions(-) create mode 100644 charts/kubedb-grafana-dashboards/templates/configmap.yaml create mode 100644 charts/kubedb-grafana-dashboards/templates/job.yaml diff --git a/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-database-replset-dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-database-replset-dashboard.json index cf315e4ce..b7c1a7f49 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-database-replset-dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-database-replset-dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ @@ -516,7 +517,7 @@ "expr": "rate(mongodb_ss_opcountersRepl{pod=~\"$pod\", legacy_op_type!~\"(command|getmore|query)\"}[$interval]) or irate(mongodb_ss_opcountersRepl{pod=~\"$pod\", legacy_op_type!~\"(command|getmore|query)\"}[5m])", "interval": "$interval", "intervalFactor": 1, - "legendFormat": "{{legacy_op_type}}", + "legendFormat": {{ `"{{legacy_op_type}}"` }}, "range": true, "refId": "A", "step": 300 @@ -755,7 +756,7 @@ "expr": "rate(mongodb_mongod_metrics_repl_network_getmores_total_milliseconds{pod=~\"$pod\"}[$interval]) or irate(mongodb_mongod_metrics_repl_network_getmores_total_milliseconds{pod=~\"$pod\"}[5m]) or rate(mongodb_ss_metrics_repl_network_getmores_totalMillis{pod=~\"$pod\"}[$interval]) or irate(mongodb_ss_metrics_repl_network_getmores_totalMillis{pod=~\"$pod\"}[5m])", "interval": "$interval", "intervalFactor": 1, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "range": true, "refId": "A", "step": 300 @@ -1265,10 +1266,16 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(kube_namespace_labels,namespace)", "refId": "Prometheus-namespace-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1276,7 +1283,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -1298,17 +1304,22 @@ "multiFormat": "glob", "name": "app", "options": [], + {{- if $shared }} "query": { "query": "label_values(mongodb_members_state{namespace=~\"$namespace\"}, rs_nm)", "refId": "Prometheus-app-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 1, "tagValuesQuery": null, "tagsQuery": null, - "type": "query", "useTags": false }, { @@ -1377,6 +1388,10 @@ ] }, "timezone": "browser", + {{- if $shared }} "title": "KubeDB / MongoDB / Database / ReplicaSet", + {{- else }} + "title": {{ printf "KubeDB / MongoDB / Database / ReplicaSet / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "version": 2 } diff --git a/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-pod-dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-pod-dashboard.json index 94f011c63..1504296da 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-pod-dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-pod-dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ @@ -351,7 +352,7 @@ "hide": false, "interval": "$interval", "intervalFactor": 1, - "legendFormat": "{{legacy_op_type}}", + "legendFormat": {{ `"{{legacy_op_type}}"` }}, "refId": "J", "step": 300 }, @@ -361,7 +362,7 @@ "hide": false, "interval": "$interval", "intervalFactor": 1, - "legendFormat": "repl_{{legacy_op_type}}", + "legendFormat": {{ `"repl_{{legacy_op_type}}"` }}, "refId": "A", "step": 300 }, @@ -480,7 +481,7 @@ "exemplar": false, "expr": "avg by (service,op_type) (rate(mongodb_ss_opLatencies_latency{service=~\"${app}-stats\"}[$interval]) / (rate(mongodb_ss_opLatencies_ops{service=~\"${app}-stats\"}[$interval]) > 0) or irate(mongodb_ss_opLatencies_latency{service=~\"${app}-stats\"}[5m]) / (irate(mongodb_ss_opLatencies_ops{service=~\"${app}-stats\"}[5m]) > 0))", "interval": "$interval", - "legendFormat": "{{op_type}}", + "legendFormat": {{ `"{{op_type}}"` }}, "range": true, "refId": "A" } @@ -711,7 +712,7 @@ "hide": false, "interval": "$interval", "intervalFactor": 1, - "legendFormat": "{{csr_type}}", + "legendFormat": {{ `"{{csr_type}}"` }}, "range": true, "refId": "J", "step": 300 @@ -829,7 +830,7 @@ "hide": false, "interval": "$interval", "intervalFactor": 1, - "legendFormat": "{{doc_op_type}}", + "legendFormat": {{ `"{{doc_op_type}}"` }}, "range": true, "refId": "J", "step": 300 @@ -948,7 +949,7 @@ "hide": false, "interval": "$interval", "intervalFactor": 1, - "legendFormat": "{{count_type}}", + "legendFormat": {{ `"{{count_type}}"` }}, "range": true, "refId": "J", "step": 300 @@ -1539,7 +1540,7 @@ "hide": false, "interval": "$interval", "intervalFactor": 1, - "legendFormat": "{{assert_type}}", + "legendFormat": {{ `"{{assert_type}}"` }}, "range": true, "refId": "J", "step": 300 @@ -1826,10 +1827,16 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(kube_namespace_labels,namespace)", "refId": "Prometheus-namespace-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1837,7 +1844,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -1857,17 +1863,22 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": { "query": "label_values(kubedb_com_mongodb_status_phase{namespace=~\"$namespace\"},app)", "refId": "Prometheus-app-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -1936,6 +1947,10 @@ ] }, "timezone": "browser", + {{- if $shared }} "title": "KubeDB / MongoDB / Pod", + {{- else }} + "title": {{ printf "KubeDB / MongoDB / Pod / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "version": 12 } diff --git a/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-summary-dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-summary-dashboard.json index 7f5e1673c..a8f0d0f59 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-summary-dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-summary-dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ @@ -121,7 +122,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{phase}}", + "legendFormat": {{ `"{{phase}}"` }}, "refId": "A" } ], @@ -454,7 +455,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{version}}", + "legendFormat": {{ `"{{version}}"` }}, "refId": "A" } ], @@ -715,7 +716,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{terminationPolicy}}", + "legendFormat": {{ `"{{terminationPolicy}}"` }}, "refId": "A" } ], @@ -792,7 +793,7 @@ "exemplar": false, "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=~\"$app-\\\\d+$|$app-shard\\\\d+-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1204,7 +1205,7 @@ "exemplar": false, "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$app-\\\\d+$|$app-shard\\\\d+-\\\\d+$\",container!=\"\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1719,7 +1720,7 @@ "exemplar": false, "expr": "avg(container_blkio_device_usage_total{namespace=\"$namespace\", pod=~\"$app-\\\\d+$|$app-shard\\\\d+-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1826,7 +1827,7 @@ "instant": false, "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}-disk-write", + "legendFormat": {{ `"{{pod}}-disk-write"` }}, "refId": "A" }, { @@ -1835,7 +1836,7 @@ "hide": false, "instant": false, "interval": "", - "legendFormat": "{{pod}}-disk-read", + "legendFormat": {{ `"{{pod}}-disk-read"` }}, "refId": "B" } ], @@ -1942,7 +1943,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2051,7 +2052,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2560,7 +2561,7 @@ "expr": "(kubelet_volume_stats_used_bytes / on(persistentvolumeclaim) group_left(pod) (kubelet_volume_stats_capacity_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) )* 100", "instant": true, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2644,7 +2645,7 @@ "expr": "(kubelet_volume_stats_used_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) ", "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2727,7 +2728,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2836,7 +2837,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2924,7 +2925,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -2933,10 +2933,16 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(kube_namespace_labels,namespace)", "refId": "Prometheus-namespace-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -2944,7 +2950,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -2964,10 +2969,16 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": { "query": "label_values(kubedb_com_mongodb_status_phase{namespace=~\"$namespace\"},app)", "refId": "Prometheus-app-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -2975,7 +2986,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] @@ -3010,7 +3020,11 @@ ] }, "timezone": "", + {{- if $shared }} "title": "KubeDB / MongoDB / Summary", + {{- else }} + "title": {{ printf "KubeDB / MongoDB / Summary / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "92M7QvyVk", "version": 1 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/templates/configmap.yaml b/charts/kubedb-grafana-dashboards/templates/configmap.yaml new file mode 100644 index 000000000..15b01c6a8 --- /dev/null +++ b/charts/kubedb-grafana-dashboards/templates/configmap.yaml @@ -0,0 +1,23 @@ +{{ $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") }} +{{ if not $shared }} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "kubedb-grafana-dashboards.fullname" . }}-config + namespace: {{ $.Release.Namespace }} + labels: + {{- include "kubedb-grafana-dashboards.labels" $ | nindent 4 }} +data: +{{- range $r := .Values.resources }} +{{- range $path, $_ := $.Files.Glob (printf "dashboards/%s/**.json" $r) }} + {{- $dasboard := omit (tpl ($.Files.Get $path) $ | mustFromJson) "id" "uid" -}} + {{ $path | replace "/" "-" | nindent 2 }}: | + {{- dict + "dashboard" $dasboard + "folderId" $.Values.dashboard.folderID + "overwrite" $.Values.dashboard.overwrite | toJson | nindent 4 -}} +{{- end }} +{{- end }} + +{{ end }} \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/templates/dashboard.yaml b/charts/kubedb-grafana-dashboards/templates/dashboard.yaml index 8bb74d50e..a2bea5fa3 100644 --- a/charts/kubedb-grafana-dashboards/templates/dashboard.yaml +++ b/charts/kubedb-grafana-dashboards/templates/dashboard.yaml @@ -1,3 +1,6 @@ +{{ $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") }} +{{ if $shared }} + {{- $gkr := .Files.Get "data/resources.yaml" | fromYaml -}} {{ range $r := .Values.resources }} {{ range $path, $_ := $.Files.Glob (printf "dashboards/%s/**.json" $r) }} @@ -22,7 +25,7 @@ spec: {{- end }} {{- end }} model: - {{- omit ($.Files.Get $path | mustFromJson) "id" "uid" | toYaml | nindent 4 }} + {{- omit (tpl ($.Files.Get $path) $ | mustFromJson) "id" "uid" | toYaml | nindent 4 }} {{- with $.Values.dashboard.folderID }} folderID: {{ . }} {{- end }} @@ -33,3 +36,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/kubedb-grafana-dashboards/templates/job.yaml b/charts/kubedb-grafana-dashboards/templates/job.yaml new file mode 100644 index 000000000..070f9a5f1 --- /dev/null +++ b/charts/kubedb-grafana-dashboards/templates/job.yaml @@ -0,0 +1,43 @@ +{{ $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") }} +{{ if not $shared }} + +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "kubedb-grafana-dashboards.fullname" . }}-installer + labels: + {{- include "kubedb-grafana-dashboards.labels" . | nindent 4 }} +spec: + # ttlSecondsAfterFinished: 0 + backoffLimit: 3 + template: + spec: + automountServiceAccountToken: false + volumes: + - name: grafana-dashboards + configMap: + name: {{ include "kubedb-grafana-dashboards.fullname" . }}-config + containers: + - name: post-json-container + image: curlimages/curl:latest + command: + - sh + - -c + - | + sleep 2; \ + FILES="/grafana/dashboards/*.json"; \ + for f in $FILES; \ + do \ + echo "Processing dashboard file $f ..."; \ + curl \ + -X POST \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer {{ .Values.grafana.apikey }}" \ + --data-binary @/etc/grafana-json/grafana-json.json \ + {{ .Values.grafana.url }}/api/dashboards/import; \ + done + volumeMounts: + - mountPath: /grafana/dashboards + name: grafana-dashboards + restartPolicy: Never +{{ end }} \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/values.yaml b/charts/kubedb-grafana-dashboards/values.yaml index 9e9c73043..a9599f13a 100644 --- a/charts/kubedb-grafana-dashboards/values.yaml +++ b/charts/kubedb-grafana-dashboards/values.yaml @@ -9,13 +9,15 @@ fullnameOverride: "" # List of resources for which dashboards will be applied resources: # +doc-gen:break - - elasticsearch - - mariadb - mongodb - - mysql - - postgres - - redis - - proxysql + + # - elasticsearch + # - mariadb + # - mongodb + # - mysql + # - postgres + # - redis + # - proxysql dashboard: # ID of Grafana folder where these dashboards will be applied @@ -33,3 +35,7 @@ grafana: name: "" # Namespace of Grafana Appbinding where these dashboards are applied namespace: "" + +app: + name: "mymg" + namespace: "demo" From a522140728c68508c31c3fb77f5c925a6867da8c Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 07:04:34 -0800 Subject: [PATCH 02/19] es dash Signed-off-by: Tamal Saha --- .../elasticsearch_database_dashboard.json | 41 +++++++++++----- .../elasticsearch_pod_dashboard.json | 49 ++++++++++++------- .../elasticsearch_summary_dashboard.json | 47 ++++++++++++------ charts/kubedb-grafana-dashboards/values.yaml | 2 +- 4 files changed, 92 insertions(+), 47 deletions(-) diff --git a/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_database_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_database_dashboard.json index c4fc87967..448907271 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_database_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_database_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ @@ -940,7 +941,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{name}}", + "legendFormat": {{ `"{{name}}"` }}, "refId": "A", "step": 240 } @@ -1044,7 +1045,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{name}}", + "legendFormat": {{ `"{{name}}"` }}, "refId": "A", "step": 240 } @@ -1145,7 +1146,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{name}}", + "legendFormat": {{ `"{{name}}"` }}, "refId": "A" } ], @@ -1246,7 +1247,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{name}}", + "legendFormat": {{ `"{{name}}"` }}, "refId": "A" } ], @@ -1366,7 +1367,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{name}}", + "legendFormat": {{ `"{{name}}"` }}, "metric": "", "refId": "A", "step": 1800 @@ -1474,7 +1475,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{name}}", + "legendFormat": {{ `"{{name}}"` }}, "metric": "", "refId": "A", "step": 1800 @@ -1587,7 +1588,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{ name }}", + "legendFormat": {{ `"{{name}}"` }}, "metric": "elasticsearch_breakers_tripped", "metrics": [ { @@ -1700,7 +1701,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{ name }}", + "legendFormat": {{ `"{{name}}"` }}, "refId": "A", "step": 240 } @@ -1806,7 +1807,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{name}}-RX", + "legendFormat": {{ `"{{name}}-RX"` }}, "refId": "A", "step": 240 }, @@ -1816,7 +1817,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{name}}-TX", + "legendFormat": {{ `"{{name}}-TX"` }}, "refId": "B", "step": 240 } @@ -1919,7 +1920,7 @@ "expr": "irate(elasticsearch_jvm_gc_collection_seconds_sum{namespace=~\"$namespace\",cluster=~\"$app\"}[1m])", "interval": "", "intervalFactor": 2, - "legendFormat": "{{ name }} {{ gc }}", + "legendFormat": {{ `"{{ name }} {{ gc }}"` }}, "refId": "A", "step": 240 } @@ -2017,7 +2018,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(kube_namespace_labels,namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -2025,7 +2032,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -2049,7 +2055,13 @@ "multi": true, "name": "app", "options": [], + {{- if $shared }} "query": "label_values(elasticsearch_cluster_health_status{namespace=~\"$namespace\"},cluster)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -2057,7 +2069,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] @@ -2092,7 +2103,11 @@ ] }, "timezone": "utc", + {{- if $shared }} "title": "KubeDB / Elasticsearch / Database", + {{- else }} + "title": {{ printf "KubeDB / Elasticsearch / Database / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "0dBMIuN7k", "version": 4 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_pod_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_pod_dashboard.json index 580bfd95f..3fbaf263d 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_pod_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_pod_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ @@ -194,7 +195,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -300,7 +301,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -404,7 +405,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "metric": "elasticsearch_cluster_health_number_of_nodes", "refId": "A", "step": 1800 @@ -512,7 +513,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1120,7 +1121,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{name}}", + "legendFormat": {{ `"{{name}}"` }}, "metric": "", "refId": "A", "step": 1800 @@ -1228,7 +1229,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{name}}", + "legendFormat": {{ `"{{name}}"` }}, "metric": "", "refId": "A", "step": 1800 @@ -1341,7 +1342,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{ name }}", + "legendFormat": {{ `"{{name}}"` }}, "metric": "elasticsearch_breakers_tripped", "metrics": [ { @@ -1454,7 +1455,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{ name }}", + "legendFormat": {{ `"{{name}}"` }}, "refId": "A", "step": 240 } @@ -1560,7 +1561,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{name}}-RX", + "legendFormat": {{ `"{{name}}-RX"` }}, "refId": "A", "step": 240 }, @@ -1570,7 +1571,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{name}}-TX", + "legendFormat": {{ `"{{name}}-TX"` }}, "refId": "B", "step": 240 } @@ -1673,7 +1674,7 @@ "expr": "irate(elasticsearch_jvm_gc_collection_seconds_sum{namespace=~\"$namespace\",cluster=~\"$app\",pod=~\"$pod\"}[1m])", "interval": "", "intervalFactor": 2, - "legendFormat": "{{ name }} {{ gc }}", + "legendFormat": {{ `"{{ name }} {{ gc }}"` }}, "refId": "A", "step": 240 } @@ -1792,7 +1793,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{name}}", + "legendFormat": {{ `"{{name}}"` }}, "refId": "A", "step": 240 } @@ -1896,7 +1897,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{name}}", + "legendFormat": {{ `"{{name}}"` }}, "refId": "A", "step": 240 } @@ -1997,7 +1998,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{name}}", + "legendFormat": {{ `"{{name}}"` }}, "refId": "A" } ], @@ -2098,7 +2099,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{name}}", + "legendFormat": {{ `"{{name}}"` }}, "refId": "A" } ], @@ -2196,7 +2197,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(kube_namespace_labels,namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -2204,7 +2211,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -2224,7 +2230,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "label_values(elasticsearch_cluster_health_status{namespace=~\"$namespace\"},cluster)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -2232,7 +2244,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -2299,7 +2310,11 @@ ] }, "timezone": "utc", + {{- if $shared }} "title": "KubeDB / Elasticsearch / Pod", + {{- else }} + "title": {{ printf "KubeDB / Elasticsearch / Pod / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "sjfsldk", "version": 3 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_summary_dashboard.json index fc3fa55c6..d8dfa4517 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_summary_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ @@ -121,7 +122,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{phase}}", + "legendFormat": {{ `"{{phase}}"` }}, "refId": "A" } ], @@ -279,7 +280,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{version}}", + "legendFormat": {{ `"{{version}}"` }}, "refId": "A" } ], @@ -441,7 +442,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{terminationPolicy}}", + "legendFormat": {{ `"{{terminationPolicy}}"` }}, "refId": "A" } ], @@ -874,7 +875,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=~\"$app-.+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1286,7 +1287,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$app-.+$\",container!=\"\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1804,7 +1805,7 @@ "exemplar": true, "expr": "avg(container_blkio_device_usage_total{namespace=\"$namespace\", pod=~\"$app-.+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1914,7 +1915,7 @@ "instant": false, "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}-disk-write", + "legendFormat": {{ `"{{pod}}-disk-write"` }}, "refId": "A" }, { @@ -1923,7 +1924,7 @@ "hide": false, "instant": false, "interval": "", - "legendFormat": "{{pod}}-disk-read", + "legendFormat": {{ `"{{pod}}-disk-read"` }}, "refId": "B" } ], @@ -2033,7 +2034,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2145,7 +2146,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2654,7 +2655,7 @@ "expr": "(kubelet_volume_stats_used_bytes / on(persistentvolumeclaim) group_left(pod) (kubelet_volume_stats_capacity_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) )* 100", "instant": true, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2738,7 +2739,7 @@ "expr": "(kubelet_volume_stats_used_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) ", "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2824,7 +2825,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2936,7 +2937,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -3007,10 +3008,16 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(kube_namespace_labels,namespace)", "refId": "Prometheus-namespace-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -3018,7 +3025,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -3038,10 +3044,16 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": { "query": "label_values(kubedb_com_elasticsearch_status_phase{namespace=~\"$namespace\"},app)", "refId": "Prometheus-app-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -3049,7 +3061,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] @@ -3084,7 +3095,11 @@ ] }, "timezone": "", + {{- if $shared }} "title": "KubeDB / Elasticsearch / Summary", + {{- else }} + "title": {{ printf "KubeDB / Elasticsearch / Summary / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "72W2px6Vk", "version": 5 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/values.yaml b/charts/kubedb-grafana-dashboards/values.yaml index a9599f13a..a0d408bfe 100644 --- a/charts/kubedb-grafana-dashboards/values.yaml +++ b/charts/kubedb-grafana-dashboards/values.yaml @@ -9,7 +9,7 @@ fullnameOverride: "" # List of resources for which dashboards will be applied resources: # +doc-gen:break - - mongodb + - elasticsearch # - elasticsearch # - mariadb From 19753c9efd1a5db0d5169459addb3970742e2945 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 07:25:52 -0800 Subject: [PATCH 03/19] kafka Signed-off-by: Tamal Saha --- .../kafka/kafka_database_dashboard.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json index 7820eb47e..e814fbfe9 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json @@ -641,7 +641,7 @@ "format": "time_series", "interval": "60s", "intervalFactor": 1, - "legendFormat": "{{gc}}", + "legendFormat": {{ `"{{gc}}"` }}, "metric": "jvm_gc_collection_seconds_sum", "refId": "A", "step": 10 @@ -731,7 +731,7 @@ "format": "time_series", "interval": "60s", "intervalFactor": 1, - "legendFormat": "{{gc}}", + "legendFormat": {{ `"{{gc}}"` }}, "metric": "", "refId": "A", "step": 10 @@ -2113,7 +2113,7 @@ "exemplar": false, "expr": "kafka_server_kafkarequesthandlerpool_requesthandleravgidle_percent{namespace=\"$namespace\", service=\"$service\"}", "instant": false, - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "range": true, "refId": "A" } @@ -2598,7 +2598,7 @@ "expr": "kafka_server_raft_metrics_commit_latency_avg{container=\"$container\", namespace=\"$namespace\", pod=\"$pod\"}", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2668,7 +2668,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "range": false, "refId": "A" } @@ -2840,7 +2840,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2907,7 +2907,7 @@ "format": "time_series", "instant": true, "interval": "", - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "range": false, "refId": "A" } @@ -3377,7 +3377,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{ $pod }}", + "legendFormat": {{ `"{{$pod}}"` }}, "refId": "A" } ], From e5b8985852d603ee797b4fc569edf8aafcd4b7a8 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 08:19:27 -0800 Subject: [PATCH 04/19] escape dash Signed-off-by: Tamal Saha --- .../dashboards/mariadb/mariadb-database.json | 34 ++--- .../dashboards/mariadb/mariadb-galera.json | 10 +- .../dashboards/mariadb/mariadb-pod.json | 126 +++++++++--------- .../dashboards/mariadb/mariadb-summary.json | 30 ++--- .../mysql/mysql_database_dashboard.json | 34 ++--- .../mysql/mysql_group_replication.json | 30 ++--- .../dashboards/mysql/mysql_pod_dashboard.json | 126 +++++++++--------- .../mysql/mysql_summary_dashboard.json | 32 ++--- .../perconaxtradb/perconaxtradb-database.json | 34 ++--- .../perconaxtradb/perconaxtradb-galera.json | 2 +- .../perconaxtradb/perconaxtradb-pod.json | 16 +-- .../perconaxtradb/perconaxtradb-summary.json | 26 ++-- .../postgres_databases_dashboard.json | 16 +-- .../postgres/postgres_summary_dashboard.json | 34 ++--- .../proxysql/proxysql-database.json | 118 ++++++++-------- .../dashboards/proxysql/proxysql-pod.json | 34 ++--- .../dashboards/proxysql/proxysql-summary.json | 28 ++-- .../dashboards/redis/redis_pod_dashboard.json | 10 +- .../redis/redis_senitnel_dashboard.json | 8 +- .../redis/redis_shards_dashboard.json | 2 +- .../redis/redis_summary_dashboard.json | 32 ++--- 21 files changed, 391 insertions(+), 391 deletions(-) diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json index 78cdc7224..09e137ee3 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json @@ -138,7 +138,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -242,7 +242,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -486,7 +486,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_queries{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -588,7 +588,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Current - {{ pod }}", + "legendFormat": {{ `"Current - {{ pod }}"` }}, "refId": "A" }, { @@ -597,7 +597,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Max - {{ pod }}", + "legendFormat": {{ `"Max - {{ pod }}"` }}, "refId": "B" } ], @@ -703,7 +703,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "reads - {{ pod }}", + "legendFormat": {{ `"reads - {{ pod }}"` }}, "refId": "A" }, { @@ -712,7 +712,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "write - {{ pod }}", + "legendFormat": {{ `"write - {{ pod }}"` }}, "refId": "B" } ], @@ -818,7 +818,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "received - {{ pod }}", + "legendFormat": {{ `"received - {{ pod }}"` }}, "refId": "A" }, { @@ -827,7 +827,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "sent - {{ pod }}", + "legendFormat": {{ `"sent - {{ pod }}"` }}, "refId": "B" } ], @@ -928,7 +928,7 @@ "expr": "topk(3, rate(mysql_global_status_commands_total{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m]))", "instant": false, "interval": "", - "legendFormat": "{{ pod }} = '{{ command }}'", + "legendFormat": {{ `"{{ pod }} = '{{ command }}'"` }}, "refId": "A" } ], @@ -1026,7 +1026,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_opened_files{namespace=~\"$namespace\",service=~\"$app+-stats\"}[1m])", "interval": "", - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1124,21 +1124,21 @@ "exemplar": true, "expr": "mysql_global_status_open_files{namespace=~\"$namespace\",service=~\"$app+-stats\"}", "interval": "", - "legendFormat": "Open Files - {{ pod }}", + "legendFormat": {{ `"Open Files - {{ pod }}"` }}, "refId": "A" }, { "exemplar": true, "expr": "mysql_global_variables_open_files_limit{namespace=~\"$namespace\",service=~\"$app+-stats\"}", "interval": "", - "legendFormat": "Open Files Limit - {{ pod }}", + "legendFormat": {{ `"Open Files Limit - {{ pod }}"` }}, "refId": "B" }, { "exemplar": true, "expr": "mysql_global_status_innodb_num_open_files{namespace=~\"$namespace\",service=~\"$app+-stats\"}", "interval": "", - "legendFormat": "InnoDB Open Files - {{ pod }}", + "legendFormat": {{ `"InnoDB Open Files - {{ pod }}"` }}, "refId": "C" } ], @@ -1237,7 +1237,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_slow_queries{namespace=~\"$namespace\",service=~\"$app+-stats\"}[1m])", "interval": "", - "legendFormat": "Slow Queries on {{ pod }}", + "legendFormat": {{ `"Slow Queries on {{ pod }}"` }}, "refId": "A" } ], @@ -1334,14 +1334,14 @@ "exemplar": true, "expr": "rate(mysql_global_status_aborted_connects{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])", "interval": "", - "legendFormat": "Aborted Connects (attempts) on - {{ pod }}", + "legendFormat": {{ `"Aborted Connects (attempts) on - {{ pod }}"` }}, "refId": "A" }, { "exemplar": true, "expr": "rate(mysql_global_status_aborted_clients{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])", "interval": "", - "legendFormat": "Aborted Clients (timeout) on - {{ pod }}", + "legendFormat": {{ `"Aborted Clients (timeout) on - {{ pod }}"` }}, "refId": "B" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json index ee68bdc8f..cfbe0296b 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json @@ -80,7 +80,7 @@ "exemplar": true, "expr": "avg by(wsrep_cluster_name)(mysql_galera_variables_info{namespace=~\"$namespace\",service=~\"$app+-stats\"})", "interval": "", - "legendFormat": "{{wsrep_cluster_name}}", + "legendFormat": {{ `"{{wsrep_cluster_name}}"` }}, "refId": "A" } ], @@ -182,7 +182,7 @@ "exemplar": true, "expr": "avg by(pod)(mysql_galera_variables_info{namespace=~\"$namespace\",service=~\"$app+-stats\"})", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -256,7 +256,7 @@ "exemplar": true, "expr": "avg_over_time(mysql_galera_evs_repl_latency_avg_seconds{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])", "interval": "", - "legendFormat": "{{pod}} - Latency Average", + "legendFormat": {{ `"{{pod}} - Latency Average"` }}, "refId": "A" } ], @@ -356,7 +356,7 @@ "exemplar": true, "expr": "rate(mysql_galera_evs_repl_latency_stdev{namespace=~\"$namespace\",service=~\"$app+-stats\"}[1m])", "interval": "", - "legendFormat": "{{pod}} - Latency Average", + "legendFormat": {{ `"{{pod}} - Latency Average"` }}, "refId": "A" } ], @@ -456,7 +456,7 @@ "exemplar": true, "expr": "rate(mysql_galera_evs_repl_latency_sample_size{namespace=~\"$namespace\",service=~\"$app+-stats\"}[1m])", "interval": "", - "legendFormat": "{{pod}} - Latency Average", + "legendFormat": {{ `"{{pod}} - Latency Average"` }}, "refId": "A" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json index 63e3690fb..1363fb640 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json @@ -82,7 +82,7 @@ "exemplar": true, "expr": "mysql_up{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "{{pod}} ", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -157,7 +157,7 @@ "format": "time_series", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -217,7 +217,7 @@ "exemplar": true, "expr": "mysql_version_info{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "{{version}}", + "legendFormat": {{ `"{{version}}"` }}, "refId": "A" } ], @@ -273,7 +273,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_queries{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -350,7 +350,7 @@ "format": "time_series", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -423,7 +423,7 @@ "exemplar": true, "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", container!=\"\", image!=\"\"}[5m])) by (pod)", "interval": "", - "legendFormat": "{{container}}", + "legendFormat": {{ `"{{container}}"` }}, "refId": "A" } ], @@ -520,7 +520,7 @@ "exemplar": true, "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", container!=\"\", image!=\"\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -618,7 +618,7 @@ "exemplar": true, "expr": "sum(process_open_fds{pod=~\"$pod\", namespace=\"$namespace\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -728,7 +728,7 @@ "exemplar": true, "expr": "mysql_global_status_max_used_connections{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Max Used Connects - {{pod}}", + "legendFormat": {{ `"Max Used Connects - {{pod}}"` }}, "refId": "A" }, { @@ -736,7 +736,7 @@ "expr": "mysql_global_variables_max_connections{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Max Connects - {{pod}}", + "legendFormat": {{ `"Max Connects - {{pod}}"` }}, "refId": "B" } ], @@ -833,7 +833,7 @@ "exemplar": true, "expr": "mysql_global_status_aborted_connects{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Aborted Connects - {{pod}}", + "legendFormat": {{ `"Aborted Connects - {{pod}}"` }}, "refId": "A" }, { @@ -841,7 +841,7 @@ "expr": "mysql_global_status_aborted_clients{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Aborted Clients - {{pod}}", + "legendFormat": {{ `"Aborted Clients - {{pod}}"` }}, "refId": "B" } ], @@ -954,7 +954,7 @@ "exemplar": true, "expr": "mysql_global_status_threads_connected{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Threads Connected - {{pod}}", + "legendFormat": {{ `"Threads Connected - {{pod}}"` }}, "refId": "A" }, { @@ -962,7 +962,7 @@ "expr": "mysql_global_status_threads_running{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Threads Running - {{pod}}", + "legendFormat": {{ `"Threads Running - {{pod}}"` }}, "refId": "B" } ], @@ -1060,7 +1060,7 @@ "exemplar": true, "expr": "mysql_global_variables_thread_cache_size{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Thread Cache Size - {{pod}}", + "legendFormat": {{ `"Thread Cache Size - {{pod}}"` }}, "refId": "A" }, { @@ -1068,7 +1068,7 @@ "expr": "mysql_global_status_threads_cached{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Threads Cached - {{pod}} ", + "legendFormat": {{ `"Threads Cached - {{pod}}"` }}, "refId": "B" }, { @@ -1076,7 +1076,7 @@ "expr": "mysql_global_status_threads_created{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Threads Created - {{pod}}", + "legendFormat": {{ `"Threads Created - {{pod}}"` }}, "refId": "C" } ], @@ -1188,7 +1188,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_created_tmp_tables{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Created Tmp Tables - {{pod}}", + "legendFormat": {{ `"Created Tmp Tables - {{pod}}"` }}, "refId": "A" }, { @@ -1196,7 +1196,7 @@ "expr": "rate(mysql_global_status_created_tmp_disk_tables{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Created Tmp Disk Tables - {{pod}}", + "legendFormat": {{ `"Created Tmp Disk Tables - {{pod}}"` }}, "refId": "B" }, { @@ -1204,7 +1204,7 @@ "expr": "mysql_global_status_created_tmp_files{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Created Tmp Files - {{pod}}", + "legendFormat": {{ `"Created Tmp Files - {{pod}}"` }}, "refId": "C" } ], @@ -1302,7 +1302,7 @@ "exemplar": true, "expr": "mysql_global_status_slow_queries{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Slow Queries - {{pod}}", + "legendFormat": {{ `"Slow Queries - {{pod}}"` }}, "refId": "A" } ], @@ -1416,7 +1416,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_select_full_join{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Select Full Join - {{pod}}", + "legendFormat": {{ `"Select Full Join - {{pod}}"` }}, "refId": "A" }, { @@ -1424,7 +1424,7 @@ "expr": "rate(mysql_global_status_select_scan{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Select Scan - {{pod}}", + "legendFormat": {{ `"Select Scan - {{pod}}"` }}, "refId": "E" } ], @@ -1522,7 +1522,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_sort_rows{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Sort Rows - {{pod}}", + "legendFormat": {{ `"Sort Rows - {{pod}}"` }}, "refId": "A" }, { @@ -1530,7 +1530,7 @@ "expr": "rate(mysql_global_status_sort_range{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Sort Range - {{pod}}", + "legendFormat": {{ `"Sort Range - {{pod}}"` }}, "refId": "B" }, { @@ -1538,7 +1538,7 @@ "expr": "rate(mysql_global_status_sort_merge_passes{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Sort Merge Passes - {{pod}}", + "legendFormat": {{ `"Sort Merge Passes - {{pod}}"` }}, "refId": "C" }, { @@ -1546,7 +1546,7 @@ "expr": "rate(mysql_global_status_sort_scan{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Sort Scan - {{pod}}", + "legendFormat": {{ `"Sort Scan - {{pod}}"` }}, "refId": "D" } ], @@ -1657,7 +1657,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_table_locks_immediate{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Table Locks Immediate - {{pod}}", + "legendFormat": {{ `"Table Locks Immediate - {{pod}}"` }}, "refId": "A" }, { @@ -1665,7 +1665,7 @@ "expr": "rate(mysql_global_status_table_locks_waited{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Table Locks Waited - {{pod}}", + "legendFormat": {{ `"Table Locks Waited - {{pod}}"` }}, "refId": "B" } ], @@ -1762,7 +1762,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_questions{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Questions - {{pod}}", + "legendFormat": {{ `"Questions - {{pod}}"` }}, "refId": "A" } ], @@ -1890,7 +1890,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Inbound - {{pod}}", + "legendFormat": {{ `"Inbound - {{pod}}"` }}, "metric": "", "refId": "A", "step": 20 @@ -1904,7 +1904,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Outbound - {{pod}}", + "legendFormat": {{ `"Outbound - {{pod}}"` }}, "metric": "", "refId": "B", "step": 20 @@ -2021,7 +2021,7 @@ "instant": false, "interval": "1h", "intervalFactor": 1, - "legendFormat": "Received - {{pod}}", + "legendFormat": {{ `"Received - {{pod}}"` }}, "metric": "", "refId": "A", "step": 20 @@ -2035,7 +2035,7 @@ "format": "time_series", "interval": "1h", "intervalFactor": 1, - "legendFormat": "Sent - {{pod}}", + "legendFormat": {{ `"Sent - {{pod}}"` }}, "metric": "", "refId": "B", "step": 20 @@ -2153,7 +2153,7 @@ "expr": "mysql_global_variables_innodb_buffer_pool_size{namespace=\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "InnoDB Buffer Pool Size - {{pod}}", + "legendFormat": {{ `"InnoDB Buffer Pool Size - {{pod}}"` }}, "refId": "A" }, { @@ -2161,7 +2161,7 @@ "expr": "mysql_global_variables_innodb_log_buffer_size{namespace=\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "InnoDB Log Buffer Size - {{pod}}", + "legendFormat": {{ `"InnoDB Log Buffer Size - {{pod}}"` }}, "refId": "B" }, { @@ -2169,7 +2169,7 @@ "expr": "mysql_global_status_innodb_mem_dictionary{namespace=\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "InnoDB Dictionary Size - {{pod}}", + "legendFormat": {{ `"InnoDB Dictionary Size - {{pod}}"` }}, "refId": "D" }, { @@ -2177,7 +2177,7 @@ "expr": "mysql_global_variables_key_buffer_size{namespace=\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Key Buffer Size - {{pod}}", + "legendFormat": {{ `"Key Buffer Size - {{pod}}"` }}, "refId": "E" }, { @@ -2185,7 +2185,7 @@ "expr": "mysql_global_variables_query_cache_size{namespace=\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Query Cache Size - {{pod}}", + "legendFormat": {{ `"Query Cache Size - {{pod}}"` }}, "refId": "F" }, { @@ -2193,7 +2193,7 @@ "expr": "mysql_global_status_innodb_mem_adaptive_hash{namespace=\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Adaptive Hash Index Size - {{pod}}", + "legendFormat": {{ `"Adaptive Hash Index Size - {{pod}}"` }}, "refId": "G" } ], @@ -2308,7 +2308,7 @@ "expr": "topk(5, rate(mysql_global_status_commands_total{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m]))", "instant": false, "interval": "", - "legendFormat": "Com_{{ command }} - {{pod}}", + "legendFormat": {{ `"Com_{{ command }} - {{pod}}"` }}, "refId": "A" } ], @@ -2424,7 +2424,7 @@ "instant": false, "interval": "1h", "intervalFactor": 1, - "legendFormat": "Com_{{ command }} - {{pod}}", + "legendFormat": {{ `"Com_{{ command }} - {{pod}}"` }}, "metric": "", "refId": "A", "step": 20 @@ -2528,7 +2528,7 @@ "expr": "rate(mysql_global_status_handlers_total{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])>0", "instant": false, "interval": "", - "legendFormat": "{{ handler }} - {{pod}}", + "legendFormat": {{ `"{{ handler }} - {{pod}}"` }}, "refId": "A" } ], @@ -2642,7 +2642,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_qcache_free_memory{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Query Cache Size - {{pod}}", + "legendFormat": {{ `"Query Cache Size - {{pod}}"` }}, "refId": "A" } ], @@ -2742,7 +2742,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_qcache_hits{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Hits - {{pod}}", + "legendFormat": {{ `"Hits - {{pod}}"` }}, "refId": "A" }, { @@ -2750,7 +2750,7 @@ "expr": "rate(mysql_global_status_qcache_inserts{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Inserts - {{pod}}", + "legendFormat": {{ `"Inserts - {{pod}}"` }}, "refId": "B" }, { @@ -2758,7 +2758,7 @@ "expr": "rate(mysql_global_status_qcache_not_cached{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Not Cached - {{pod}}", + "legendFormat": {{ `"Not Cached - {{pod}}"` }}, "refId": "C" }, { @@ -2766,7 +2766,7 @@ "expr": "rate(mysql_global_status_qcache_lowmem_prunes{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Prunes - {{pod}}", + "legendFormat": {{ `"Prunes - {{pod}}"` }}, "refId": "D" }, { @@ -2774,7 +2774,7 @@ "expr": "rate(mysql_global_status_qcache_queries_in_cache{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Queries in Cache - {{pod}}", + "legendFormat": {{ `"Queries in Cache - {{pod}}"` }}, "refId": "E" } ], @@ -2886,7 +2886,7 @@ "exemplar": true, "expr": "mysql_global_status_opened_files{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Openings - {{pod}}", + "legendFormat": {{ `"Openings - {{pod}}"` }}, "refId": "A" } ], @@ -2984,21 +2984,21 @@ "exemplar": true, "expr": "mysql_global_status_open_files{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Open Files - {{pod}}", + "legendFormat": {{ `"Open Files - {{pod}}"` }}, "refId": "A" }, { "exemplar": true, "expr": "mysql_global_variables_open_files_limit{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Open Files Limit - {{pod}}", + "legendFormat": {{ `"Open Files Limit - {{pod}}"` }}, "refId": "B" }, { "exemplar": true, "expr": "mysql_global_status_innodb_num_open_files{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "InnoDB Open Files - {{pod}}", + "legendFormat": {{ `"InnoDB Open Files - {{pod}}"` }}, "refId": "C" } ], @@ -3110,7 +3110,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_opened_tables{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Openings - {{pod}}", + "legendFormat": {{ `"Openings - {{pod}}"` }}, "refId": "A" }, { @@ -3118,7 +3118,7 @@ "expr": "rate(mysql_global_status_table_open_cache_hits{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Hits - {{pod}}", + "legendFormat": {{ `"Hits - {{pod}}"` }}, "refId": "B" }, { @@ -3126,7 +3126,7 @@ "expr": "rate(mysql_global_status_table_open_cache_misses{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Misses - {{pod}}", + "legendFormat": {{ `"Misses - {{pod}}"` }}, "refId": "C" }, { @@ -3134,7 +3134,7 @@ "expr": "rate(mysql_global_status_table_open_cache_overflows{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Misses due to Overflows - {{pod}}", + "legendFormat": {{ `"Misses due to Overflows - {{pod}}"` }}, "refId": "D" }, { @@ -3142,7 +3142,7 @@ "expr": "rate(mysql_global_status_table_open_cache_hits{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Table Open Cache Hit Ratio - {{pod}}", + "legendFormat": {{ `"Table Open Cache Hit Ratio - {{pod}}"` }}, "refId": "E" } ], @@ -3240,14 +3240,14 @@ "exemplar": true, "expr": "mysql_global_status_open_tables{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Open Tables - {{pod}}", + "legendFormat": {{ `"Open Tables - {{pod}}"` }}, "refId": "A" }, { "exemplar": true, "expr": "mysql_global_variables_table_open_cache{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Table Open Cache - {{pod}}", + "legendFormat": {{ `"Table Open Cache - {{pod}}"` }}, "refId": "B" } ], @@ -3345,14 +3345,14 @@ "exemplar": true, "expr": "mysql_global_status_open_table_definitions{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Open Table Definitions - {{pod}}", + "legendFormat": {{ `"Open Table Definitions - {{pod}}"` }}, "refId": "A" }, { "exemplar": true, "expr": "mysql_global_variables_table_definition_cache{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Table Definitions Cache Size - {{pod}}", + "legendFormat": {{ `"Table Definitions Cache Size - {{pod}}"` }}, "refId": "B" }, { @@ -3360,7 +3360,7 @@ "expr": "mysql_global_status_opened_table_definitions{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Opened Table Definitions - {{pod}}", + "legendFormat": {{ `"Opened Table Definitions - {{pod}}"` }}, "refId": "C" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json index 8a6cc2201..b08848b3e 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json @@ -121,7 +121,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{phase}}", + "legendFormat": {{ `"{{phase}}"` }}, "refId": "A" } ], @@ -204,7 +204,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{ version }}", + "legendFormat": {{ `"{{version}}"` }}, "refId": "A" } ], @@ -283,7 +283,7 @@ "format": "time_series", "instant": true, "interval": "", - "legendFormat": "{{requireSSL}}", + "legendFormat": {{ `"{{requireSSL}}"` }}, "refId": "A" } ], @@ -365,7 +365,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{terminationPolicy}}", + "legendFormat": {{ `"{{terminationPolicy}}"` }}, "refId": "A" } ], @@ -794,7 +794,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1197,7 +1197,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\",container!=\"\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1704,7 +1704,7 @@ "exemplar": true, "expr": "avg(container_blkio_device_usage_total{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1803,7 +1803,7 @@ "instant": false, "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}-disk-write", + "legendFormat": {{ `"{{pod}}-disk-write"` }}, "refId": "A" }, { @@ -1812,7 +1812,7 @@ "hide": false, "instant": false, "interval": "", - "legendFormat": "{{pod}}-disk-read", + "legendFormat": {{ `"{{pod}}-disk-read"` }}, "refId": "B" } ], @@ -1911,7 +1911,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2012,7 +2012,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2521,7 +2521,7 @@ "expr": "(kubelet_volume_stats_used_bytes / on(persistentvolumeclaim) group_left(pod) (kubelet_volume_stats_capacity_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) )* 100", "instant": true, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2605,7 +2605,7 @@ "expr": "(kubelet_volume_stats_used_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) ", "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2678,7 +2678,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2779,7 +2779,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json index b3045ccc5..99dd61c8f 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json @@ -138,7 +138,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -242,7 +242,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -316,7 +316,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_queries{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -418,7 +418,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Current - {{ pod }}", + "legendFormat": {{ `"Current - {{ pod }}"` }}, "refId": "A" }, { @@ -427,7 +427,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Max - {{ pod }}", + "legendFormat": {{ `"Max - {{ pod }}"` }}, "refId": "B" } ], @@ -533,7 +533,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "reads - {{ pod }}", + "legendFormat": {{ `"reads - {{ pod }}"` }}, "refId": "A" }, { @@ -542,7 +542,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "write - {{ pod }}", + "legendFormat": {{ `"write - {{ pod }}"` }}, "refId": "B" } ], @@ -648,7 +648,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "received - {{ pod }}", + "legendFormat": {{ `"received - {{ pod }}"` }}, "refId": "A" }, { @@ -657,7 +657,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "sent - {{ pod }}", + "legendFormat": {{ `"sent - {{ pod }}"` }}, "refId": "B" } ], @@ -758,7 +758,7 @@ "expr": "topk(3, rate(mysql_global_status_commands_total{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m]))", "instant": false, "interval": "", - "legendFormat": "{{ pod }} = '{{ command }}'", + "legendFormat": {{ `"{{ pod }} = '{{ command }}'"` }}, "refId": "A" } ], @@ -856,7 +856,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_opened_files{namespace=~\"$namespace\",service=~\"$app+-stats\"}[1m])", "interval": "", - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -954,21 +954,21 @@ "exemplar": true, "expr": "mysql_global_status_open_files{namespace=~\"$namespace\",service=~\"$app+-stats\"}", "interval": "", - "legendFormat": "Open Files - {{ pod }}", + "legendFormat": {{ `"Open Files - {{ pod }}"` }}, "refId": "A" }, { "exemplar": true, "expr": "mysql_global_variables_open_files_limit{namespace=~\"$namespace\",service=~\"$app+-stats\"}", "interval": "", - "legendFormat": "Open Files Limit - {{ pod }}", + "legendFormat": {{ `"Open Files Limit - {{ pod }}"` }}, "refId": "B" }, { "exemplar": true, "expr": "mysql_global_status_innodb_num_open_files{namespace=~\"$namespace\",service=~\"$app+-stats\"}", "interval": "", - "legendFormat": "InnoDB Open Files - {{ pod }}", + "legendFormat": {{ `"InnoDB Open Files - {{ pod }}"` }}, "refId": "C" } ], @@ -1067,7 +1067,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_slow_queries{namespace=~\"$namespace\",service=~\"$app+-stats\"}[1m])", "interval": "", - "legendFormat": "Slow Queries on {{ pod }}", + "legendFormat": {{ `"Slow Queries on {{ pod }}"` }}, "refId": "A" } ], @@ -1164,14 +1164,14 @@ "exemplar": true, "expr": "rate(mysql_global_status_aborted_connects{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])", "interval": "", - "legendFormat": "Aborted Connects (attempts) on - {{ pod }}", + "legendFormat": {{ `"Aborted Connects (attempts) on - {{ pod }}"` }}, "refId": "A" }, { "exemplar": true, "expr": "rate(mysql_global_status_aborted_clients{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])", "interval": "", - "legendFormat": "Aborted Clients (timeout) on - {{ pod }}", + "legendFormat": {{ `"Aborted Clients (timeout) on - {{ pod }}"` }}, "refId": "B" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json index e31055b0f..4859a9c63 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json @@ -112,7 +112,7 @@ "exemplar": true, "expr": "avg by(member_host)(mysql_perf_schema_replication_group_member_info{namespace=~\"$namespace\",service=~\"$app+-stats\"})", "interval": "", - "legendFormat": "{{member_host}}", + "legendFormat": {{ `"{{member_host}}"` }}, "refId": "A" } ], @@ -180,7 +180,7 @@ "exemplar": true, "expr": "avg by(member_host)(mysql_perf_schema_replication_group_member_info{namespace=~\"$namespace\",service=~\"$app+-stats\", member_role=\"PRIMARY\"})", "interval": "", - "legendFormat": "{{member_host}}", + "legendFormat": {{ `"{{member_host}}"` }}, "refId": "A" } ], @@ -256,7 +256,7 @@ "exemplar": true, "expr": "max by (pod)(max_over_time(mysql_perf_schema_replication_group_worker_lag_in_seconds{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m]))", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -356,7 +356,7 @@ "exemplar": true, "expr": "max by (pod)(max_over_time(mysql_perf_schema_replication_group_worker_transport_time_seconds{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])) < 20000000", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -456,7 +456,7 @@ "exemplar": true, "expr": "max by (pod)(max_over_time(mysql_perf_schema_replication_group_worker_apply_time_seconds{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])) < 20000000", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -556,7 +556,7 @@ "exemplar": true, "expr": "max by (pod)(max_over_time(mysql_perf_schema_replication_group_worker_apply_time_seconds{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])) < 20000000", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -656,7 +656,7 @@ "exemplar": true, "expr": "max by (pod)(max_over_time(mysql_perf_schema_replication_group_worker_time_RL_seconds{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])) < 20000000", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -770,7 +770,7 @@ "exemplar": true, "expr": "avg by (pod)(rate(mysql_perf_schema_transactions_checked_total{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m]) or rate(mysql_perf_schema_5_transactions_checked_total{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])) ", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -870,7 +870,7 @@ "exemplar": true, "expr": "avg by (pod)(rate(mysql_perf_schema_transactions_rows_validating_total{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m]) or rate(mysql_perf_schema_5_transactions_rows_validating_total{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])) ", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -970,7 +970,7 @@ "exemplar": true, "expr": "avg by (pod)(rate(mysql_perf_schema_transactions_remote_applied_total{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])) ", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1070,7 +1070,7 @@ "exemplar": true, "expr": "avg by (pod)(rate(mysql_perf_schema_transactions_local_proposed_total{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])) ", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1170,7 +1170,7 @@ "exemplar": true, "expr": "avg by (pod)(rate(mysql_perf_schema_transactions_remote_in_applier_queue{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])) ", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1270,7 +1270,7 @@ "exemplar": true, "expr": "avg by (pod)(rate(mysql_perf_schema_transactions_local_rollback_total{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])) ", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1370,7 +1370,7 @@ "exemplar": true, "expr": "avg by (pod)(rate(mysql_perf_schema_transactions_in_queue{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m]) or rate(mysql_perf_schema_5_transactions_in_queue{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])) ", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1484,7 +1484,7 @@ "exemplar": true, "expr": "avg by (pod)(rate(mysql_perf_schema_conflicts_detected_total{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m]) or rate(mysql_perf_schema_5_conflicts_detected_total{namespace=~\"$namespace\",service=~\"$app+-stats\"}[5m])) ", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json index 5562b4362..adbf02856 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json @@ -82,7 +82,7 @@ "exemplar": true, "expr": "mysql_up{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "{{pod}} ", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -157,7 +157,7 @@ "format": "time_series", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -217,7 +217,7 @@ "exemplar": true, "expr": "mysql_version_info{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "{{version}}", + "legendFormat": {{ `"{{version}}"` }}, "refId": "A" } ], @@ -273,7 +273,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_queries{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -350,7 +350,7 @@ "format": "time_series", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -423,7 +423,7 @@ "exemplar": true, "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", container!=\"\", image!=\"\"}[5m])) by (pod)", "interval": "", - "legendFormat": "{{container}}", + "legendFormat": {{ `"{{container}}"` }}, "refId": "A" } ], @@ -520,7 +520,7 @@ "exemplar": true, "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", container!=\"\", image!=\"\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -618,7 +618,7 @@ "exemplar": true, "expr": "sum(process_open_fds{pod=~\"$pod\", namespace=\"$namespace\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -728,7 +728,7 @@ "exemplar": true, "expr": "mysql_global_status_max_used_connections{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Max Used Connects - {{pod}}", + "legendFormat": {{ `"Max Used Connects - {{pod}}"` }}, "refId": "A" }, { @@ -736,7 +736,7 @@ "expr": "mysql_global_variables_max_connections{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Max Connects - {{pod}}", + "legendFormat": {{ `"Max Connects - {{pod}}"` }}, "refId": "B" } ], @@ -833,7 +833,7 @@ "exemplar": true, "expr": "mysql_global_status_aborted_connects{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Aborted Connects - {{pod}}", + "legendFormat": {{ `"Aborted Connects - {{pod}}"` }}, "refId": "A" }, { @@ -841,7 +841,7 @@ "expr": "mysql_global_status_aborted_clients{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Aborted Clients - {{pod}}", + "legendFormat": {{ `"Aborted Clients - {{pod}}"` }}, "refId": "B" } ], @@ -954,7 +954,7 @@ "exemplar": true, "expr": "mysql_global_status_threads_connected{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Threads Connected - {{pod}}", + "legendFormat": {{ `"Threads Connected - {{pod}}"` }}, "refId": "A" }, { @@ -962,7 +962,7 @@ "expr": "mysql_global_status_threads_running{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Threads Running - {{pod}}", + "legendFormat": {{ `"Threads Running - {{pod}}"` }}, "refId": "B" } ], @@ -1060,7 +1060,7 @@ "exemplar": true, "expr": "mysql_global_variables_thread_cache_size{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Thread Cache Size - {{pod}}", + "legendFormat": {{ `"Thread Cache Size - {{pod}}"` }}, "refId": "A" }, { @@ -1068,7 +1068,7 @@ "expr": "mysql_global_status_threads_cached{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Threads Cached - {{pod}} ", + "legendFormat": {{ `"Threads Cached - {{pod}}"` }}, "refId": "B" }, { @@ -1076,7 +1076,7 @@ "expr": "mysql_global_status_threads_created{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Threads Created - {{pod}}", + "legendFormat": {{ `"Threads Created - {{pod}}"` }}, "refId": "C" } ], @@ -1188,7 +1188,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_created_tmp_tables{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Created Tmp Tables - {{pod}}", + "legendFormat": {{ `"Created Tmp Tables - {{pod}}"` }}, "refId": "A" }, { @@ -1196,7 +1196,7 @@ "expr": "rate(mysql_global_status_created_tmp_disk_tables{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Created Tmp Disk Tables - {{pod}}", + "legendFormat": {{ `"Created Tmp Disk Tables - {{pod}}"` }}, "refId": "B" }, { @@ -1204,7 +1204,7 @@ "expr": "mysql_global_status_created_tmp_files{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Created Tmp Files - {{pod}}", + "legendFormat": {{ `"Created Tmp Files - {{pod}}"` }}, "refId": "C" } ], @@ -1302,7 +1302,7 @@ "exemplar": true, "expr": "mysql_global_status_slow_queries{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Slow Queries - {{pod}}", + "legendFormat": {{ `"Slow Queries - {{pod}}"` }}, "refId": "A" } ], @@ -1416,7 +1416,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_select_full_join{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Select Full Join - {{pod}}", + "legendFormat": {{ `"Select Full Join - {{pod}}"` }}, "refId": "A" }, { @@ -1424,7 +1424,7 @@ "expr": "rate(mysql_global_status_select_scan{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Select Scan - {{pod}}", + "legendFormat": {{ `"Select Scan - {{pod}}"` }}, "refId": "E" } ], @@ -1522,7 +1522,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_sort_rows{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Sort Rows - {{pod}}", + "legendFormat": {{ `"Sort Rows - {{pod}}"` }}, "refId": "A" }, { @@ -1530,7 +1530,7 @@ "expr": "rate(mysql_global_status_sort_range{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Sort Range - {{pod}}", + "legendFormat": {{ `"Sort Range - {{pod}}"` }}, "refId": "B" }, { @@ -1538,7 +1538,7 @@ "expr": "rate(mysql_global_status_sort_merge_passes{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Sort Merge Passes - {{pod}}", + "legendFormat": {{ `"Sort Merge Passes - {{pod}}"` }}, "refId": "C" }, { @@ -1546,7 +1546,7 @@ "expr": "rate(mysql_global_status_sort_scan{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Sort Scan - {{pod}}", + "legendFormat": {{ `"Sort Scan - {{pod}}"` }}, "refId": "D" } ], @@ -1657,7 +1657,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_table_locks_immediate{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Table Locks Immediate - {{pod}}", + "legendFormat": {{ `"Table Locks Immediate - {{pod}}"` }}, "refId": "A" }, { @@ -1665,7 +1665,7 @@ "expr": "rate(mysql_global_status_table_locks_waited{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Table Locks Waited - {{pod}}", + "legendFormat": {{ `"Table Locks Waited - {{pod}}"` }}, "refId": "B" } ], @@ -1762,7 +1762,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_questions{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Questions - {{pod}}", + "legendFormat": {{ `"Questions - {{pod}}"` }}, "refId": "A" } ], @@ -1890,7 +1890,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Inbound - {{pod}}", + "legendFormat": {{ `"Inbound - {{pod}}"` }}, "metric": "", "refId": "A", "step": 20 @@ -1904,7 +1904,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Outbound - {{pod}}", + "legendFormat": {{ `"Outbound - {{pod}}"` }}, "metric": "", "refId": "B", "step": 20 @@ -2021,7 +2021,7 @@ "instant": false, "interval": "1h", "intervalFactor": 1, - "legendFormat": "Received - {{pod}}", + "legendFormat": {{ `"Received - {{pod}}"` }}, "metric": "", "refId": "A", "step": 20 @@ -2035,7 +2035,7 @@ "format": "time_series", "interval": "1h", "intervalFactor": 1, - "legendFormat": "Sent - {{pod}}", + "legendFormat": {{ `"Sent - {{pod}}"` }}, "metric": "", "refId": "B", "step": 20 @@ -2153,7 +2153,7 @@ "expr": "mysql_global_variables_innodb_buffer_pool_size{namespace=\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "InnoDB Buffer Pool Size - {{pod}}", + "legendFormat": {{ `"InnoDB Buffer Pool Size - {{pod}}"` }}, "refId": "A" }, { @@ -2161,7 +2161,7 @@ "expr": "mysql_global_variables_innodb_log_buffer_size{namespace=\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "InnoDB Log Buffer Size - {{pod}}", + "legendFormat": {{ `"InnoDB Log Buffer Size - {{pod}}"` }}, "refId": "B" }, { @@ -2169,7 +2169,7 @@ "expr": "mysql_global_status_innodb_mem_dictionary{namespace=\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "InnoDB Dictionary Size - {{pod}}", + "legendFormat": {{ `"InnoDB Dictionary Size - {{pod}}"` }}, "refId": "D" }, { @@ -2177,7 +2177,7 @@ "expr": "mysql_global_variables_key_buffer_size{namespace=\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Key Buffer Size - {{pod}}", + "legendFormat": {{ `"Key Buffer Size - {{pod}}"` }}, "refId": "E" }, { @@ -2185,7 +2185,7 @@ "expr": "mysql_global_variables_query_cache_size{namespace=\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Query Cache Size - {{pod}}", + "legendFormat": {{ `"Query Cache Size - {{pod}}"` }}, "refId": "F" }, { @@ -2193,7 +2193,7 @@ "expr": "mysql_global_status_innodb_mem_adaptive_hash{namespace=\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Adaptive Hash Index Size - {{pod}}", + "legendFormat": {{ `"Adaptive Hash Index Size - {{pod}}"` }}, "refId": "G" } ], @@ -2308,7 +2308,7 @@ "expr": "topk(5, rate(mysql_global_status_commands_total{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m]))", "instant": false, "interval": "", - "legendFormat": "Com_{{ command }} - {{pod}}", + "legendFormat": {{ `"Com_{{ command }} - {{pod}}"` }}, "refId": "A" } ], @@ -2424,7 +2424,7 @@ "instant": false, "interval": "1h", "intervalFactor": 1, - "legendFormat": "Com_{{ command }} - {{pod}}", + "legendFormat": {{ `"Com_{{ command }} - {{pod}}"` }}, "metric": "", "refId": "A", "step": 20 @@ -2528,7 +2528,7 @@ "expr": "rate(mysql_global_status_handlers_total{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])>0", "instant": false, "interval": "", - "legendFormat": "{{ handler }} - {{pod}}", + "legendFormat": {{ `"{{ handler }} - {{pod}}"` }}, "refId": "A" } ], @@ -2642,7 +2642,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_qcache_free_memory{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Query Cache Size - {{pod}}", + "legendFormat": {{ `"Query Cache Size - {{pod}}"` }}, "refId": "A" } ], @@ -2742,7 +2742,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_qcache_hits{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Hits - {{pod}}", + "legendFormat": {{ `"Hits - {{pod}}"` }}, "refId": "A" }, { @@ -2750,7 +2750,7 @@ "expr": "rate(mysql_global_status_qcache_inserts{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Inserts - {{pod}}", + "legendFormat": {{ `"Inserts - {{pod}}"` }}, "refId": "B" }, { @@ -2758,7 +2758,7 @@ "expr": "rate(mysql_global_status_qcache_not_cached{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Not Cached - {{pod}}", + "legendFormat": {{ `"Not Cached - {{pod}}"` }}, "refId": "C" }, { @@ -2766,7 +2766,7 @@ "expr": "rate(mysql_global_status_qcache_lowmem_prunes{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Prunes - {{pod}}", + "legendFormat": {{ `"Prunes - {{pod}}"` }}, "refId": "D" }, { @@ -2774,7 +2774,7 @@ "expr": "rate(mysql_global_status_qcache_queries_in_cache{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Queries in Cache - {{pod}}", + "legendFormat": {{ `"Queries in Cache - {{pod}}"` }}, "refId": "E" } ], @@ -2886,7 +2886,7 @@ "exemplar": true, "expr": "mysql_global_status_opened_files{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Openings - {{pod}}", + "legendFormat": {{ `"Openings - {{pod}}"` }}, "refId": "A" } ], @@ -2984,21 +2984,21 @@ "exemplar": true, "expr": "mysql_global_status_open_files{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Open Files - {{pod}}", + "legendFormat": {{ `"Open Files - {{pod}}"` }}, "refId": "A" }, { "exemplar": true, "expr": "mysql_global_variables_open_files_limit{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Open Files Limit - {{pod}}", + "legendFormat": {{ `"Open Files Limit - {{pod}}"` }}, "refId": "B" }, { "exemplar": true, "expr": "mysql_global_status_innodb_num_open_files{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "InnoDB Open Files - {{pod}}", + "legendFormat": {{ `"InnoDB Open Files - {{pod}}"` }}, "refId": "C" } ], @@ -3110,7 +3110,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_opened_tables{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Openings - {{pod}}", + "legendFormat": {{ `"Openings - {{pod}}"` }}, "refId": "A" }, { @@ -3118,7 +3118,7 @@ "expr": "rate(mysql_global_status_table_open_cache_hits{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Hits - {{pod}}", + "legendFormat": {{ `"Hits - {{pod}}"` }}, "refId": "B" }, { @@ -3126,7 +3126,7 @@ "expr": "rate(mysql_global_status_table_open_cache_misses{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Misses - {{pod}}", + "legendFormat": {{ `"Misses - {{pod}}"` }}, "refId": "C" }, { @@ -3134,7 +3134,7 @@ "expr": "rate(mysql_global_status_table_open_cache_overflows{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Misses due to Overflows - {{pod}}", + "legendFormat": {{ `"Misses due to Overflows - {{pod}}"` }}, "refId": "D" }, { @@ -3142,7 +3142,7 @@ "expr": "rate(mysql_global_status_table_open_cache_hits{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Table Open Cache Hit Ratio - {{pod}}", + "legendFormat": {{ `"Table Open Cache Hit Ratio - {{pod}}"` }}, "refId": "E" } ], @@ -3240,14 +3240,14 @@ "exemplar": true, "expr": "mysql_global_status_open_tables{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Open Tables - {{pod}}", + "legendFormat": {{ `"Open Tables - {{pod}}"` }}, "refId": "A" }, { "exemplar": true, "expr": "mysql_global_variables_table_open_cache{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Table Open Cache - {{pod}}", + "legendFormat": {{ `"Table Open Cache - {{pod}}"` }}, "refId": "B" } ], @@ -3345,14 +3345,14 @@ "exemplar": true, "expr": "mysql_global_status_open_table_definitions{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Open Table Definitions - {{pod}}", + "legendFormat": {{ `"Open Table Definitions - {{pod}}"` }}, "refId": "A" }, { "exemplar": true, "expr": "mysql_global_variables_table_definition_cache{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Table Definitions Cache Size - {{pod}}", + "legendFormat": {{ `"Table Definitions Cache Size - {{pod}}"` }}, "refId": "B" }, { @@ -3360,7 +3360,7 @@ "expr": "mysql_global_status_opened_table_definitions{namespace=~\"$namespace\",service=~\"$app+-stats\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Opened Table Definitions - {{pod}}", + "legendFormat": {{ `"Opened Table Definitions - {{pod}}"` }}, "refId": "C" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json index 5e9d024ef..fe51e4b0b 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json @@ -121,7 +121,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{phase}}", + "legendFormat": {{ `"{{phase}}"` }}, "refId": "A" } ], @@ -204,7 +204,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{ version }}", + "legendFormat": {{ `"{{version}}"` }}, "refId": "A" } ], @@ -287,7 +287,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{ useAddressType }}", + "legendFormat": {{ `"{{ useAddressType }}"` }}, "refId": "A" } ], @@ -366,7 +366,7 @@ "format": "time_series", "instant": true, "interval": "", - "legendFormat": "{{requireSSL}}", + "legendFormat": {{ `"{{requireSSL}}"` }}, "refId": "A" } ], @@ -448,7 +448,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{terminationPolicy}}", + "legendFormat": {{ `"{{terminationPolicy}}"` }}, "refId": "A" } ], @@ -877,7 +877,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1280,7 +1280,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\",container!=\"\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1787,7 +1787,7 @@ "exemplar": true, "expr": "avg(container_blkio_device_usage_total{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1886,7 +1886,7 @@ "instant": false, "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}-disk-write", + "legendFormat": {{ `"{{pod}}-disk-write"` }}, "refId": "A" }, { @@ -1895,7 +1895,7 @@ "hide": false, "instant": false, "interval": "", - "legendFormat": "{{pod}}-disk-read", + "legendFormat": {{ `"{{pod}}-disk-read"` }}, "refId": "B" } ], @@ -1994,7 +1994,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2095,7 +2095,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2604,7 +2604,7 @@ "expr": "(kubelet_volume_stats_used_bytes / on(persistentvolumeclaim) group_left(pod) (kubelet_volume_stats_capacity_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) )* 100", "instant": true, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2688,7 +2688,7 @@ "expr": "(kubelet_volume_stats_used_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) ", "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2761,7 +2761,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2862,7 +2862,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json index b3c9f87e1..473cf6420 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json @@ -138,7 +138,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -242,7 +242,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -486,7 +486,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_queries{namespace=~\"$namespace\",service=~\"$app\"}[5m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -588,7 +588,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Current - {{ pod }}", + "legendFormat": {{ `"Current - {{ pod }}"` }}, "refId": "A" }, { @@ -597,7 +597,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Max - {{ pod }}", + "legendFormat": {{ `"Max - {{ pod }}"` }}, "refId": "B" } ], @@ -703,7 +703,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "reads - {{ pod }}", + "legendFormat": {{ `"reads - {{ pod }}"` }}, "refId": "A" }, { @@ -712,7 +712,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "write - {{ pod }}", + "legendFormat": {{ `"write - {{ pod }}"` }}, "refId": "B" } ], @@ -818,7 +818,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "received - {{ pod }}", + "legendFormat": {{ `"received - {{ pod }}"` }}, "refId": "A" }, { @@ -827,7 +827,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "sent - {{ pod }}", + "legendFormat": {{ `"sent - {{ pod }}"` }}, "refId": "B" } ], @@ -928,7 +928,7 @@ "expr": "topk(3, rate(mysql_global_status_commands_total{namespace=~\"$namespace\",service=~\"$app\"}[5m]))", "instant": false, "interval": "", - "legendFormat": "{{ pod }} = '{{ command }}'", + "legendFormat": {{ `"{{ pod }} = '{{ command }}'"` }}, "refId": "A" } ], @@ -1026,7 +1026,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_opened_files{namespace=~\"$namespace\",service=~\"$app\"}[1m])", "interval": "", - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1124,21 +1124,21 @@ "exemplar": true, "expr": "mysql_global_status_open_files{namespace=~\"$namespace\",service=~\"$app\"}", "interval": "", - "legendFormat": "Open Files - {{ pod }}", + "legendFormat": {{ `"Open Files - {{ pod }}"` }}, "refId": "A" }, { "exemplar": true, "expr": "mysql_global_variables_open_files_limit{namespace=~\"$namespace\",service=~\"$app\"}", "interval": "", - "legendFormat": "Open Files Limit - {{ pod }}", + "legendFormat": {{ `"Open Files Limit - {{ pod }}"` }}, "refId": "B" }, { "exemplar": true, "expr": "mysql_global_status_innodb_num_open_files{namespace=~\"$namespace\",service=~\"$app\"}", "interval": "", - "legendFormat": "InnoDB Open Files - {{ pod }}", + "legendFormat": {{ `"InnoDB Open Files - {{ pod }}"` }}, "refId": "C" } ], @@ -1237,7 +1237,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_slow_queries{namespace=~\"$namespace\",service=~\"$app\"}[1m])", "interval": "", - "legendFormat": "Slow Queries on {{ pod }}", + "legendFormat": {{ `"Slow Queries on {{ pod }}"` }}, "refId": "A" } ], @@ -1334,14 +1334,14 @@ "exemplar": true, "expr": "rate(mysql_global_status_aborted_connects{namespace=~\"$namespace\",service=~\"$app\"}[5m])", "interval": "", - "legendFormat": "Aborted Connects (attempts) on - {{ pod }}", + "legendFormat": {{ `"Aborted Connects (attempts) on - {{ pod }}"` }}, "refId": "A" }, { "exemplar": true, "expr": "rate(mysql_global_status_aborted_clients{namespace=~\"$namespace\",service=~\"$app\"}[5m])", "interval": "", - "legendFormat": "Aborted Clients (timeout) on - {{ pod }}", + "legendFormat": {{ `"Aborted Clients (timeout) on - {{ pod }}"` }}, "refId": "B" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json index a64b7dc71..095bdd5ef 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json @@ -182,7 +182,7 @@ "exemplar": true, "expr": "avg by(pod)(mysql_galera_variables_info{namespace=~\"$namespace\",service=~\"$app\"})", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json index 2e594e219..789ff57b1 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json @@ -82,7 +82,7 @@ "exemplar": true, "expr": "mysql_up{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "{{pod}} ", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -157,7 +157,7 @@ "format": "time_series", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -217,7 +217,7 @@ "exemplar": true, "expr": "mysql_version_info{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "{{version}}", + "legendFormat": {{ `"{{version}}"` }}, "refId": "A" } ], @@ -273,7 +273,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_queries{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -350,7 +350,7 @@ "format": "time_series", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -423,7 +423,7 @@ "exemplar": true, "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}[5m])) by (pod)", "interval": "", - "legendFormat": "{{container}}", + "legendFormat": {{ `"{{container}}"` }}, "refId": "A" } ], @@ -520,7 +520,7 @@ "exemplar": true, "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -618,7 +618,7 @@ "exemplar": true, "expr": "sum(process_open_fds{pod=\"$pod\", namespace=\"$namespace\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json index 583f86653..d3a32c7c9 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json @@ -121,7 +121,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{phase}}", + "legendFormat": {{ `"{{phase}}"` }}, "refId": "A" } ], @@ -204,7 +204,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{ version }}", + "legendFormat": {{ `"{{version}}"` }}, "refId": "A" } ], @@ -283,7 +283,7 @@ "format": "time_series", "instant": true, "interval": "", - "legendFormat": "{{requireSSL}}", + "legendFormat": {{ `"{{requireSSL}}"` }}, "refId": "A" } ], @@ -365,7 +365,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{terminationPolicy}}", + "legendFormat": {{ `"{{terminationPolicy}}"` }}, "refId": "A" } ], @@ -794,7 +794,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1197,7 +1197,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\",container!=\"\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1704,7 +1704,7 @@ "exemplar": true, "expr": "avg(container_blkio_device_usage_total{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1911,7 +1911,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2012,7 +2012,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2521,7 +2521,7 @@ "expr": "(kubelet_volume_stats_used_bytes / on(persistentvolumeclaim) group_left(pod) (kubelet_volume_stats_capacity_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) )* 100", "instant": true, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2605,7 +2605,7 @@ "expr": "(kubelet_volume_stats_used_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) ", "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2678,7 +2678,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2779,7 +2779,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json index a5c3588c6..803a4674e 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json @@ -159,7 +159,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{datname}} commits", + "legendFormat": {{ `"{{datname}} commits"` }}, "refId": "A" }, { @@ -168,7 +168,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{datname}} rollbacks", + "legendFormat": {{ `"{{datname}} rollbacks"` }}, "refId": "B" } ], @@ -273,7 +273,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{datname}}", + "legendFormat": {{ `"{{datname}}"` }}, "refId": "A", "step": 2 } @@ -378,7 +378,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{datname}}, s: {{state}}", + "legendFormat": {{ `"{{datname}}, s: {{state}}"` }}, "refId": "A", "step": 2 } @@ -486,7 +486,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{datname}}", + "legendFormat": {{ `"{{datname}}"` }}, "refId": "A", "step": 2 } @@ -593,7 +593,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{datname}},{{mode}}", + "legendFormat": {{ `"{{datname}},{{mode}}"` }}, "refId": "A", "step": 2 } @@ -699,7 +699,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{datname}}", + "legendFormat": {{ `"{{datname}}"` }}, "refId": "A", "step": 2 } @@ -804,7 +804,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{datname}}, s: {{state}}", + "legendFormat": {{ `"{{datname}}, s: {{state}}"` }}, "refId": "A", "step": 2 } diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json index 40b51ee0f..3f9a76285 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json @@ -99,7 +99,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{version}}", + "legendFormat": {{ `"{{version}}"` }}, "refId": "A" } ], @@ -308,7 +308,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{phase}}", + "legendFormat": {{ `"{{phase}}"` }}, "refId": "A" } ], @@ -376,7 +376,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{sslMode}}", + "legendFormat": {{ `"{{sslMode}}"` }}, "refId": "A" } ], @@ -456,7 +456,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{terminationPolicy}}", + "legendFormat": {{ `"{{terminationPolicy}}"` }}, "refId": "A" } ], @@ -880,7 +880,7 @@ "expr": "AVG(rate(pg_stat_replication_reply_time{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\"}[5m])) by (pod)", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -987,7 +987,7 @@ "expr": "sum(pg_stat_activity_count{namespace=\"$namespace\",pod=~\"$app-\\\\d+$\"}) by (state)", "instant": false, "interval": "", - "legendFormat": "{{state}}", + "legendFormat": "{{ `"{{state}}"` }}", "refId": "A" } ], @@ -1187,7 +1187,7 @@ "exemplar": false, "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1595,7 +1595,7 @@ "exemplar": false, "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\",container!=\"\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2107,7 +2107,7 @@ "exemplar": false, "expr": "avg(container_blkio_device_usage_total{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2217,7 +2217,7 @@ "instant": false, "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}-disk-write", + "legendFormat": {{ `"{{pod}}-disk-write"` }}, "refId": "A" }, { @@ -2226,7 +2226,7 @@ "hide": false, "instant": false, "interval": "", - "legendFormat": "{{pod}}-disk-read", + "legendFormat": {{ `"{{pod}}-disk-read"` }}, "refId": "B" } ], @@ -2336,7 +2336,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2448,7 +2448,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2957,7 +2957,7 @@ "expr": "(kubelet_volume_stats_used_bytes / on(persistentvolumeclaim) group_left(pod) (kubelet_volume_stats_capacity_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) )* 100", "instant": true, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -3041,7 +3041,7 @@ "expr": "(kubelet_volume_stats_used_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) ", "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -3127,7 +3127,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -3239,7 +3239,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json index 284d36642..cd66d6721 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json @@ -130,7 +130,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -234,7 +234,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{ pod }}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -326,7 +326,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Free_connecntions - {{ pod }}", + "legendFormat": {{ `"Free_connecntions - {{ pod }}"` }}, "refId": "A" }, { @@ -335,7 +335,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Used_connections - {{ pod }}", + "legendFormat": {{ `"Used_connections - {{ pod }}"` }}, "refId": "B" } ], @@ -441,7 +441,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "received - {{ pod }}", + "legendFormat": {{ `"received - {{ pod }}"` }}, "refId": "A" }, { @@ -450,7 +450,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "sent - {{ pod }}", + "legendFormat": {{ `"sent - {{ pod }}"` }}, "refId": "B" } ], @@ -549,7 +549,7 @@ "exemplar": true, "expr": "rate(proxysql_slow_queries_total{namespace=~\"$namespace\",service=~\"$app\"}[1m])", "interval": "", - "legendFormat": "Slow Queries on {{ pod }}", + "legendFormat": {{ `"Slow Queries on {{ pod }}"` }}, "refId": "A" } ], @@ -646,14 +646,14 @@ "exemplar": true, "expr": "rate(proxysql_server_connections_total{namespace=~\"$namespace\",service=~\"$app\",status=\"aborted\"}[5m])", "interval": "", - "legendFormat": "Aborted Connects (attempts) on - {{ pod }}", + "legendFormat": {{ `"Aborted Connects (attempts) on - {{ pod }}"` }}, "refId": "A" }, { "exemplar": true, "expr": "rate(proxysql_server_connections_total{namespace=~\"$namespace\",service=~\"$app\",status=\"aborted\"}[5m])", "interval": "", - "legendFormat": "Aborted Clients (timeout) on - {{ pod }}", + "legendFormat": {{ `"Aborted Clients (timeout) on - {{ pod }}"` }}, "refId": "B" } ], @@ -764,7 +764,7 @@ "exemplar": true, "expr": "rate(proxysql_questions_total{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -858,7 +858,7 @@ "exemplar": true, "expr": "rate(proxysql_slow_queries_total{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -952,7 +952,7 @@ "exemplar": true, "expr": "rate(proxysql_gtid_session_collected_total{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1046,7 +1046,7 @@ "exemplar": true, "expr": "rate(proxysql_gtid_consistent_queries_total{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1140,7 +1140,7 @@ "exemplar": true, "expr": "rate(proxysql_generated_error_packets_total{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1234,7 +1234,7 @@ "exemplar": true, "expr": "rate(proxysql_backend_lagging_during_query_total{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1328,7 +1328,7 @@ "exemplar": true, "expr": "rate(proxysql_backend_offline_during_query_total{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1907,7 +1907,7 @@ "exemplar": true, "expr": "rate(proxysql_query_cache_purged_total{namespace=~\"$namespace\",service=\"$app\"}[5m]) ", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2016,7 +2016,7 @@ "exemplar": true, "expr": "rate(proxysql_mysql_unexpected_frontend_com_quit_total{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2110,7 +2110,7 @@ "exemplar": true, "expr": "rate(proxysql_mysql_unexpected_frontend_packets_total{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2204,7 +2204,7 @@ "exemplar": true, "expr": "rate(proxysql_automatic_detected_sql_injection_total{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2704,7 +2704,7 @@ "exemplar": true, "expr": "rate(proxysql_server_connections_connected{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2798,7 +2798,7 @@ "exemplar": true, "expr": "rate(proxysql_client_connections_connected{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2986,7 +2986,7 @@ "exemplar": true, "expr": "proxysql_connpool_conns_latency_us{namespace=~\"$namespace\",service=\"$app\",hostgroup=\"2\"}", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -3471,7 +3471,7 @@ "expr": "proxysql_active_transactions{namespace=~\"$namespace\",service=\"$app\"}", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -3568,7 +3568,7 @@ "expr": "proxysql_client_connections_non_idle{namespace=~\"$namespace\",service=\"$app\"}", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -3665,7 +3665,7 @@ "expr": "proxysql_mysql_thread_workers{namespace=~\"$namespace\",service=\"$app\"}", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -3762,7 +3762,7 @@ "expr": "rate(proxysql_mysql_session_internal_bytes{namespace=~\"$namespace\",service=\"$app\"}[1m])", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -3859,7 +3859,7 @@ "expr": "rate(proxysql_connpool_memory_bytes{namespace=~\"$namespace\",service=\"$app\"}[1m])", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -4259,7 +4259,7 @@ "exemplar": true, "expr": "rate(proxysql_myhgm_myconnpool_get_total{namespace=~\"$namespace\",service=\"$app\"}[5m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -4353,7 +4353,7 @@ "exemplar": true, "expr": "rate(proxysql_myhgm_myconnpool_get_ok_total{namespace=~\"$namespace\",service=\"$app\"}[5m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -4447,7 +4447,7 @@ "exemplar": true, "expr": "rate(proxysql_myhgm_myconnpool_get_ping_total{namespace=~\"$namespace\",service=\"$app\"}[5m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -4541,7 +4541,7 @@ "exemplar": true, "expr": "rate(proxysql_myhgm_myconnpool_push_total{namespace=~\"$namespace\",service=\"$app\"}[5m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -4635,7 +4635,7 @@ "exemplar": true, "expr": "rate(proxysql_myhgm_myconnpool_reset_total{namespace=~\"$namespace\",service=\"$app\"}[5m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -4729,7 +4729,7 @@ "exemplar": true, "expr": "rate(proxysql_myhgm_myconnpool_destroy_total{namespace=~\"$namespace\",service=\"$app\"}[5m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -4823,7 +4823,7 @@ "exemplar": true, "expr": "rate(proxysql_myhgm_auto_increment_multiplex_total{namespace=~\"$namespace\",service=\"$app\"}[5m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -4932,7 +4932,7 @@ "exemplar": true, "expr": "rate(proxysql_access_denied_wrong_password_total{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -5026,7 +5026,7 @@ "exemplar": true, "expr": "rate(proxysql_access_denied_max_connections_total{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -5120,7 +5120,7 @@ "exemplar": true, "expr": "rate(proxysql_access_denied_max_user_connections_total{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -5229,7 +5229,7 @@ "exemplar": true, "expr": "rate(proxysql_stack_memory_mysql_threads_bytes{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -5323,7 +5323,7 @@ "exemplar": true, "expr": "rate(proxysql_stack_memory_admin_threads_bytes{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -5417,7 +5417,7 @@ "exemplar": true, "expr": "rate(proxysql_stack_memory_cluster_threads{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -5526,7 +5526,7 @@ "exemplar": true, "expr": "rate(proxysql_stmt_client_active{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -5620,7 +5620,7 @@ "exemplar": true, "expr": "rate(proxysql_stmt_client_active_unique{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -5714,7 +5714,7 @@ "exemplar": true, "expr": "rate(proxysql_stmt_server_active{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -5808,7 +5808,7 @@ "exemplar": true, "expr": "rate(proxysql_stmt_server_active_unique{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -5902,7 +5902,7 @@ "exemplar": true, "expr": "rate(proxysql_stmt_max_stmt_id{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -5996,7 +5996,7 @@ "exemplar": true, "expr": "rate(proxysql_stmt_cached{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -6293,7 +6293,7 @@ "exemplar": true, "expr": "rate(proxysql_mysql_firewall_users_table_bytes{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -6387,7 +6387,7 @@ "exemplar": true, "expr": "rate(proxysql_mysql_firewall_users_config_bytes{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -6481,7 +6481,7 @@ "exemplar": true, "expr": "rate(proxysql_mysql_firewall_rules_table_bytes{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -6575,7 +6575,7 @@ "exemplar": true, "expr": "rate(proxysql_mysql_firewall_rules_config_bytes{namespace=~\"$namespace\",service=\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -6726,7 +6726,7 @@ "instant": false, "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -6863,7 +6863,7 @@ "instant": false, "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -6987,7 +6987,7 @@ "format": "time_series", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -7111,7 +7111,7 @@ "format": "time_series", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -7267,7 +7267,7 @@ "format": "time_series", "instant": false, "interval": "", - "legendFormat": "{{pod}} ", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -7423,7 +7423,7 @@ "format": "time_series", "instant": false, "interval": "", - "legendFormat": "{{pod}} ", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -7522,7 +7522,7 @@ "format": "time_series", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -7658,7 +7658,7 @@ "format": "time_series", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json index 9906a0411..99f89d80d 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json @@ -82,7 +82,7 @@ "exemplar": true, "expr": "proxysql_uptime_seconds_total{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "{{pod}} ", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -157,7 +157,7 @@ "format": "time_series", "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -230,7 +230,7 @@ "exemplar": true, "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\", pod=~\"$pod\", container!=\"\", image!=\"\"}[5m])) by (pod)", "interval": "", - "legendFormat": "{{container}}", + "legendFormat": {{ `"{{container}}"` }}, "refId": "A" } ], @@ -327,7 +327,7 @@ "exemplar": true, "expr": "sum(container_memory_working_set_bytes{namespace=~\"$namespace\", pod=~\"$pod\", container!=\"\", image!=\"\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -437,7 +437,7 @@ "exemplar": true, "expr": "proxysql_connpool_conns{status=\"used\",namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Used Connects - {{pod}}", + "legendFormat": {{ `"Used Connects - {{pod}}"` }}, "refId": "A" }, { @@ -445,7 +445,7 @@ "expr": "proxysql_connpool_conns{status=\"free\",namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Free Connects - {{pod}}", + "legendFormat": {{ `"Free Connects - {{pod}}"` }}, "refId": "B" } ], @@ -542,7 +542,7 @@ "exemplar": true, "expr": "proxysql_server_connections_total{ status=\"aborted\",namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Aborted Connects - {{pod}}", + "legendFormat": {{ `"Aborted Connects - {{pod}}"` }}, "refId": "A" } ], @@ -654,7 +654,7 @@ "exemplar": true, "expr": "proxysql_slow_queries_total{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Slow Queries - {{pod}}", + "legendFormat": {{ `"Slow Queries - {{pod}}"` }}, "refId": "A" } ], @@ -765,7 +765,7 @@ "exemplar": true, "expr": "rate(proxysql_questions_total{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Questions - {{pod}}", + "legendFormat": {{ `"Questions - {{pod}}"` }}, "refId": "A" } ], @@ -893,7 +893,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Inbound - {{pod}} from {{endpoint}}", + "legendFormat": {{ `"Inbound - {{pod}} from {{endpoint}}"` }}, "metric": "", "refId": "A", "step": 20 @@ -907,7 +907,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Outbound - {{pod}} to {{endpoint}}", + "legendFormat": {{ `"Outbound - {{pod}} to {{endpoint}}"` }}, "metric": "", "refId": "B", "step": 20 @@ -1023,7 +1023,7 @@ "exemplar": true, "expr": "rate(proxysql_query_cache_memory_bytes{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Query Cache Size - {{pod}}", + "legendFormat": {{ `"Query Cache Size - {{pod}}"` }}, "refId": "A" } ], @@ -1123,7 +1123,7 @@ "exemplar": true, "expr": "rate(proxysql_query_cache_count_get_total{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Get-Total - {{pod}}", + "legendFormat": {{ `"Get-Total - {{pod}}"` }}, "refId": "A" }, { @@ -1131,7 +1131,7 @@ "expr": "rate(proxysql_query_cache_count_set_total{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Set-Total - {{pod}}", + "legendFormat": {{ `"Set-Total - {{pod}}"` }}, "refId": "B" }, { @@ -1139,7 +1139,7 @@ "expr": "rate(proxysql_query_cache_bytes_total{op=\"read\",namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Read - {{pod}}", + "legendFormat": {{ `"Read - {{pod}}"` }}, "refId": "D" }, { @@ -1147,7 +1147,7 @@ "expr": "rate(proxysql_query_cache_bytes_total{op=\"written\",namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Write - {{pod}}", + "legendFormat": {{ `"Write - {{pod}}"` }}, "refId": "E" }, { @@ -1155,7 +1155,7 @@ "expr": "rate(proxysql_query_cache_purged_total{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Purged - {{pod}}", + "legendFormat": {{ `"Purged - {{pod}}"` }}, "refId": "C" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json index 9c2151872..fc09f996b 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json @@ -121,7 +121,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{phase}}", + "legendFormat": {{ `"{{phase}}"` }}, "refId": "A" } ], @@ -204,7 +204,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{ version }}", + "legendFormat": {{ `"{{version}}"` }}, "refId": "A" } ], @@ -268,7 +268,7 @@ "expr": "kubedb_com_proxysql_info{namespace=\"$namespace\", app=\"$app\"}", "instant": true, "interval": "", - "legendFormat": "{{ backend }}", + "legendFormat": {{ `"{{ backend }}"` }}, "refId": "A" } ], @@ -348,7 +348,7 @@ "expr": "kubedb_com_proxysql_info{namespace=\"$namespace\", app=\"$app\", ssl!~\"^$\"}", "instant": true, "interval": "", - "legendFormat": "{{ssl}}", + "legendFormat": {{ `"{{ssl}}"` }}, "refId": "A" } ], @@ -727,7 +727,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{terminationPolicy}}", + "legendFormat": {{ `"{{terminationPolicy}}"` }}, "refId": "A" } ], @@ -798,7 +798,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1201,7 +1201,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\",container!=\"\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1708,7 +1708,7 @@ "exemplar": true, "expr": "avg(container_blkio_device_usage_total{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1807,7 +1807,7 @@ "instant": false, "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}-disk-write", + "legendFormat": {{ `"{{pod}}-disk-write"` }}, "refId": "A" }, { @@ -1816,7 +1816,7 @@ "hide": false, "instant": false, "interval": "", - "legendFormat": "{{pod}}-disk-read", + "legendFormat": {{ `"{{pod}}-disk-read"` }}, "refId": "B" } ], @@ -1915,7 +1915,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2016,7 +2016,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2129,7 +2129,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2230,7 +2230,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json index 219a8171f..b3587a17d 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json @@ -222,7 +222,7 @@ "instant": false, "interval": "", "intervalFactor": 2, - "legendFormat": "{{role}}", + "legendFormat": {{ `"{{role}}"` }}, "metric": "", "refId": "A", "step": 2 @@ -306,7 +306,7 @@ "instant": true, "interval": "", "intervalFactor": 2, - "legendFormat": "{{master_host}}", + "legendFormat": {{ `"{{master_host}}"` }}, "metric": "", "refId": "A", "step": 2 @@ -1008,7 +1008,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{ input }}", + "legendFormat": {{ `"{{input}}"` }}, "refId": "A", "step": 240 }, @@ -1018,7 +1018,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{ output }}", + "legendFormat": {{ `"{{output}}"` }}, "refId": "B", "step": 240 } @@ -1123,7 +1123,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{ cmd }}", + "legendFormat": {{ `"{{cmd}}"` }}, "metric": "redis_command_calls_total", "refId": "A", "step": 240 diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json index c88e40cb5..12074e785 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json @@ -530,7 +530,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{ input }}", + "legendFormat": {{ `"{{input}}"` }}, "refId": "A", "step": 240 }, @@ -540,7 +540,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{ output }}", + "legendFormat": {{ `"{{output}}"` }}, "refId": "B", "step": 240 } @@ -761,7 +761,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=~\"$app-\\\\d+$|$app-shard\\\\d+-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1175,7 +1175,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$app-\\\\d+$|$app-shard\\\\d+-\\\\d+$\",container!=\"\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json index 6ca3128a9..b81355d4e 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json @@ -568,7 +568,7 @@ "instant": false, "interval": "", "intervalFactor": 2, - "legendFormat": "{{redis_mode}}", + "legendFormat": {{ `"{{redis_mode}}"` }}, "metric": "", "refId": "A", "step": 2 diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json index 081167d87..84bd9962a 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json @@ -121,7 +121,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{phase}}", + "legendFormat": {{ `"{{phase}}"` }}, "refId": "A" } ], @@ -202,7 +202,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{version}}", + "legendFormat": {{ `"{{version}}"` }}, "refId": "A" } ], @@ -350,7 +350,7 @@ "instant": true, "interval": "", "intervalFactor": 1, - "legendFormat": "{{mode}}", + "legendFormat": {{ `"{{mode}}"` }}, "refId": "A" } ], @@ -430,7 +430,7 @@ "format": "table", "instant": true, "interval": "", - "legendFormat": "{{terminationPolicy}}", + "legendFormat": {{ `"{{terminationPolicy}}"` }}, "refId": "A" } ], @@ -868,7 +868,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=~\"$app-\\\\d+$|$app-shard\\\\d+-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1282,7 +1282,7 @@ "exemplar": true, "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$app-\\\\d+$|$app-shard\\\\d+-\\\\d+$\",container!=\"\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1800,7 +1800,7 @@ "exemplar": true, "expr": "avg(container_blkio_device_usage_total{namespace=\"$namespace\", pod=~\"$app-\\\\d+$|$app-shard\\\\d+-\\\\d+$\"}) by (pod)", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -1910,7 +1910,7 @@ "instant": false, "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}-disk-write", + "legendFormat": {{ `"{{pod}}-disk-write"` }}, "refId": "A" }, { @@ -1919,7 +1919,7 @@ "hide": false, "instant": false, "interval": "", - "legendFormat": "{{pod}}-disk-read", + "legendFormat": {{ `"{{pod}}-disk-read"` }}, "refId": "B" } ], @@ -2029,7 +2029,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2141,7 +2141,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2650,7 +2650,7 @@ "expr": "(kubelet_volume_stats_used_bytes / on(persistentvolumeclaim) group_left(pod) (kubelet_volume_stats_capacity_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) )* 100", "instant": true, "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2734,7 +2734,7 @@ "expr": "(kubelet_volume_stats_used_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) ", "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "refId": "A" } ], @@ -2820,7 +2820,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -2932,7 +2932,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{pod}}", + "legendFormat": {{ `"{{pod}}"` }}, "legendLink": null, "refId": "A", "step": 10 @@ -3048,7 +3048,7 @@ "instant": false, "interval": "", "intervalFactor": 2, - "legendFormat": "{{ db }}", + "legendFormat": {{ `"{{db}}"` }}, "refId": "A" } ], From 73ce949ccf67f8602d066fc041da75ac6cd946d5 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 08:21:04 -0800 Subject: [PATCH 05/19] added-all Signed-off-by: Tamal Saha --- .../dashboards/kafka/kafka_database_dashboard.json | 1 + .../dashboards/mariadb/mariadb-database.json | 1 + .../dashboards/mariadb/mariadb-galera.json | 1 + .../dashboards/mariadb/mariadb-pod.json | 1 + .../dashboards/mariadb/mariadb-summary.json | 1 + .../dashboards/mysql/mysql_database_dashboard.json | 1 + .../dashboards/mysql/mysql_group_replication.json | 1 + .../dashboards/mysql/mysql_pod_dashboard.json | 1 + .../dashboards/mysql/mysql_summary_dashboard.json | 1 + .../dashboards/perconaxtradb/perconaxtradb-database.json | 1 + .../dashboards/perconaxtradb/perconaxtradb-galera.json | 1 + .../dashboards/perconaxtradb/perconaxtradb-pod.json | 1 + .../dashboards/perconaxtradb/perconaxtradb-summary.json | 1 + .../dashboards/postgres/postgres_databases_dashboard.json | 1 + .../dashboards/postgres/postgres_pods_dashboard.json | 1 + .../dashboards/postgres/postgres_summary_dashboard.json | 1 + .../dashboards/proxysql/proxysql-database.json | 1 + .../dashboards/proxysql/proxysql-pod.json | 1 + .../dashboards/proxysql/proxysql-summary.json | 1 + .../dashboards/redis/redis_pod_dashboard.json | 1 + .../dashboards/redis/redis_senitnel_dashboard.json | 1 + .../dashboards/redis/redis_shards_dashboard.json | 1 + .../dashboards/redis/redis_summary_dashboard.json | 1 + 23 files changed, 23 insertions(+) diff --git a/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json index e814fbfe9..a74fce455 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json index 09e137ee3..76008197c 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json index cfbe0296b..5970ff2df 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json index 1363fb640..19e99c009 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json index b08848b3e..f5c04c9be 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json index 99dd61c8f..5bff93a25 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json index 4859a9c63..37e5e5b33 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json index adbf02856..5146b9dbe 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json index fe51e4b0b..4118e44ed 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json index 473cf6420..4e997ced4 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json index 095bdd5ef..7c7a5ef8b 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json index 789ff57b1..159e3c485 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json index d3a32c7c9..d6168c2d2 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json index 803a4674e..bd0215883 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json index ff4a9b91a..7ebba066c 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json index 3f9a76285..8919cc68c 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json index cd66d6721..ebbbb73c7 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json index 99f89d80d..133abc1b7 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json index fc09f996b..35c6b8b1e 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json index b3587a17d..981b4dcf1 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json index 12074e785..3383cd4d1 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json index b81355d4e..420e4fc25 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json index 84bd9962a..9597931fe 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json @@ -1,3 +1,4 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} { "annotations": { "list": [ From 50df5a2d3e52f52bd572d80e5e632ba04013b9f2 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 08:34:32 -0800 Subject: [PATCH 06/19] templatize title Signed-off-by: Tamal Saha --- .../dashboards/kafka/kafka_database_dashboard.json | 4 ++++ .../dashboards/mariadb/mariadb-database.json | 4 ++++ .../dashboards/mariadb/mariadb-galera.json | 4 ++++ .../dashboards/mariadb/mariadb-pod.json | 4 ++++ .../dashboards/mariadb/mariadb-summary.json | 4 ++++ .../dashboards/mysql/mysql_database_dashboard.json | 4 ++++ .../dashboards/mysql/mysql_group_replication.json | 4 ++++ .../dashboards/mysql/mysql_pod_dashboard.json | 4 ++++ .../dashboards/mysql/mysql_summary_dashboard.json | 4 ++++ .../dashboards/perconaxtradb/perconaxtradb-database.json | 4 ++++ .../dashboards/perconaxtradb/perconaxtradb-galera.json | 4 ++++ .../dashboards/perconaxtradb/perconaxtradb-pod.json | 4 ++++ .../dashboards/perconaxtradb/perconaxtradb-summary.json | 4 ++++ .../dashboards/postgres/postgres_databases_dashboard.json | 4 ++++ .../dashboards/postgres/postgres_pods_dashboard.json | 4 ++++ .../dashboards/postgres/postgres_summary_dashboard.json | 4 ++++ .../dashboards/proxysql/proxysql-database.json | 4 ++++ .../dashboards/proxysql/proxysql-pod.json | 4 ++++ .../dashboards/proxysql/proxysql-summary.json | 4 ++++ .../dashboards/redis/redis_pod_dashboard.json | 4 ++++ .../dashboards/redis/redis_senitnel_dashboard.json | 4 ++++ .../dashboards/redis/redis_shards_dashboard.json | 4 ++++ .../dashboards/redis/redis_summary_dashboard.json | 4 ++++ 23 files changed, 92 insertions(+) diff --git a/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json index a74fce455..0bfe55f6a 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json @@ -3861,7 +3861,11 @@ ] }, "timezone": "utc", + {{- if $shared }} "title": "KubeDB / Kafka / Database", + {{- else }} + "title": {{ printf "KubeDB / Kafka / Database / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "LwWjURa4k", "version": 1, "weekStart": "" diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json index 76008197c..67ba56186 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json @@ -1484,7 +1484,11 @@ }, "timepicker": {}, "timezone": "", + {{- if $shared }} "title": "KubeDB / MariaDB / Database", + {{- else }} + "title": {{ printf "KubeDB / MariaDB / Database / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "ohrahgv7z", "version": 8 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json index 5970ff2df..25886526a 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json @@ -596,7 +596,11 @@ }, "timepicker": {}, "timezone": "", + {{- if $shared }} "title": "KubeDB / MariaDB / Galera-Cluster", + {{- else }} + "title": {{ printf "KubeDB / MariaDB / Galera-Cluster / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "Zmva7c57k", "version": 5 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json index 19e99c009..3a38f4b86 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json @@ -3533,7 +3533,11 @@ }, "timepicker": {}, "timezone": "", + {{- if $shared }} "title": "KubeDB / MariaDB / Pod", + {{- else }} + "title": {{ printf "KubeDB / MariaDB / Pod / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "FktZiiOnz", "version": 3 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json index f5c04c9be..e3e027dd0 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json @@ -2954,7 +2954,11 @@ ] }, "timezone": "", + {{- if $shared }} "title": "KubeDB / MariaDB / Summary", + {{- else }} + "title": {{ printf "KubeDB / MariaDB / Summary / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "VnOgk2Hnk", "version": 11 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json index 5bff93a25..7cb70d5b8 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json @@ -1314,7 +1314,11 @@ }, "timepicker": {}, "timezone": "", + {{- if $shared }} "title": "KubeDB / MySQL / Database", + {{- else }} + "title": {{ printf "KubeDB / MySQL / Database / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "ohrahgv7T", "version": 2 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json index 37e5e5b33..201070f52 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json @@ -1624,7 +1624,11 @@ }, "timepicker": {}, "timezone": "", + {{- if $shared }} "title": "KubeDB / MySQL / Group-Replication-Summary", + {{- else }} + "title": {{ printf "KubeDB / MySQL / Group-Replication-Summary / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "Zmva7c57k", "version": 2 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json index 5146b9dbe..292bdb281 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json @@ -3532,7 +3532,11 @@ }, "timepicker": {}, "timezone": "", + {{- if $shared }} "title": "KubeDB / MySQL / Pod", + {{- else }} + "title": {{ printf "KubeDB / MySQL / Pod / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "FktZiiOnz", "version": 6 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json index 4118e44ed..e6ec8d475 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json @@ -3037,7 +3037,11 @@ ] }, "timezone": "", + {{- if $shared }} "title": "KubeDB / MySQL / Summary", + {{- else }} + "title": {{ printf "KubeDB / MySQL / Summary / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "VsnOgk2Hnk", "version": 3 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json index 4e997ced4..5e2ae9f76 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json @@ -1484,7 +1484,11 @@ }, "timepicker": {}, "timezone": "", + {{- if $shared }} "title": "KubeDB / PerconaXtraDB / Database", + {{- else }} + "title": {{ printf "KubeDB / PerconaXtraDB / Database / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "ohrahgv7z", "version": 8 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json index 7c7a5ef8b..8fa633c61 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json @@ -596,7 +596,11 @@ }, "timepicker": {}, "timezone": "", + {{- if $shared }} "title": "KubeDB / PerconaXtraDB / Galera-Cluster", + {{- else }} + "title": {{ printf "KubeDB / PerconaXtraDB / Galera-Cluster / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "Zmva7c57k", "version": 5 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json index 159e3c485..d1f2b62c2 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json @@ -3533,7 +3533,11 @@ }, "timepicker": {}, "timezone": "", + {{- if $shared }} "title": "KubeDB / PerconaXtraDB / Pod", + {{- else }} + "title": {{ printf "KubeDB / PerconaXtraDB / Pod / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "FktZiiOnz", "version": 3 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json index d6168c2d2..0f8866f4e 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json @@ -2954,7 +2954,11 @@ ] }, "timezone": "", + {{- if $shared }} "title": "KubeDB / PerconaXtraDB / Summary", + {{- else }} + "title": {{ printf "KubeDB / PerconaXtraDB / Summary / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "VnOgk2Hnkx", "version": 2 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json index bd0215883..b3737fb4e 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json @@ -1931,7 +1931,11 @@ ] }, "timezone": "", + {{- if $shared }} "title": "KubeDB / Postgres / Database", + {{- else }} + "title": {{ printf "KubeDB / Postgres / Database / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "6v_W_NNn_kl", "version": 2 } diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json index 7ebba066c..3e82ca2d2 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json @@ -1694,7 +1694,11 @@ ] }, "timezone": "", + {{- if $shared }} "title": "KubeDB / Postgres / Pod", + {{- else }} + "title": {{ printf "KubeDB / Postgres / Pod / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "IgXOThN7ztest", "version": 2 } diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json index 8919cc68c..7d3212c40 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json @@ -3413,7 +3413,11 @@ ] }, "timezone": "", + {{- if $shared }} "title": "KubeDB / Postgres / Summary", + {{- else }} + "title": {{ printf "KubeDB / Postgres / Summary / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "VnOgk2Hnky", "version": 2 } diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json index ebbbb73c7..c4cc893dc 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json @@ -7807,7 +7807,11 @@ }, "timepicker": {}, "timezone": "", + {{- if $shared }} "title": "KubeDB / ProxySQL / Database", + {{- else }} + "title": {{ printf "KubeDB / ProxySQL / Database / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "ohrahgv7T", "version": 10 } diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json index 133abc1b7..23e4a328d 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json @@ -1337,7 +1337,11 @@ }, "timepicker": {}, "timezone": "", + {{- if $shared }} "title": "KubeDB / ProxySQL / Pod", + {{- else }} + "title": {{ printf "KubeDB / ProxySQL / Pod / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "FktZiiOnz", "version": 9 } diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json index 35c6b8b1e..f545ba15b 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json @@ -2405,7 +2405,11 @@ ] }, "timezone": "", + {{- if $shared }} "title": "KubeDB / ProxySQL / Summary", + {{- else }} + "title": {{ printf "KubeDB / ProxySQL / Summary / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "VsnOgk2Hnk", "version": 9 } diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json index 981b4dcf1..feeda3276 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json @@ -1776,7 +1776,11 @@ ] }, "timezone": "", + {{- if $shared }} "title": "KubeDB / Redis / Pod", + {{- else }} + "title": {{ printf "KubeDB / Redis / Pod / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "fF-N4cH7k", "version": 13 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json index 3383cd4d1..4fffac553 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json @@ -1999,7 +1999,11 @@ ] }, "timezone": "utc", + {{- if $shared }} "title": "KubeDB / RedisSentinel / Pod", + {{- else }} + "title": {{ printf "KubeDB / RedisSentinel / Pod / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "fF-N4cH7k", "version": 4 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json index 420e4fc25..9e1e56449 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json @@ -804,7 +804,11 @@ ] }, "timezone": "", + {{- if $shared }} "title": "KubeDB / Redis / Shard", + {{- else }} + "title": {{ printf "KubeDB / Redis / Shard / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "fF-N4cHsh", "version": 7 } \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json index 9597931fe..9d4aa94eb 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json @@ -3439,7 +3439,11 @@ ] }, "timezone": "", + {{- if $shared }} "title": "KubeDB / Redis / Summary", + {{- else }} + "title": {{ printf "KubeDB / Redis / Summary / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} "uid": "wzK8X8Nrd", "version": 9 } \ No newline at end of file From 4c70f1f9d3fab16cdd2f09354cec44b96e6ba8a8 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 09:01:36 -0800 Subject: [PATCH 07/19] name, ns var Signed-off-by: Tamal Saha --- .../dashboards/kafka/kafka_database_dashboard.json | 7 ++++++- .../dashboards/mariadb/mariadb-database.json | 14 ++++++++++++-- .../dashboards/mariadb/mariadb-galera.json | 14 ++++++++++++-- .../dashboards/mariadb/mariadb-pod.json | 14 ++++++++++++-- .../dashboards/mariadb/mariadb-summary.json | 14 ++++++++++++-- .../dashboards/mysql/mysql_database_dashboard.json | 14 ++++++++++++-- .../dashboards/mysql/mysql_group_replication.json | 14 ++++++++++++-- .../dashboards/mysql/mysql_pod_dashboard.json | 14 ++++++++++++-- .../dashboards/mysql/mysql_summary_dashboard.json | 14 ++++++++++++-- .../perconaxtradb/perconaxtradb-database.json | 14 ++++++++++++-- .../perconaxtradb/perconaxtradb-galera.json | 14 ++++++++++++-- .../perconaxtradb/perconaxtradb-pod.json | 14 ++++++++++++-- .../perconaxtradb/perconaxtradb-summary.json | 14 ++++++++++++-- .../postgres/postgres_databases_dashboard.json | 14 ++++++++++++-- .../postgres/postgres_pods_dashboard.json | 14 ++++++++++++-- .../postgres/postgres_summary_dashboard.json | 14 ++++++++++++-- .../dashboards/proxysql/proxysql-database.json | 14 ++++++++++++-- .../dashboards/proxysql/proxysql-pod.json | 14 ++++++++++++-- .../dashboards/proxysql/proxysql-summary.json | 14 ++++++++++++-- .../dashboards/redis/redis_pod_dashboard.json | 14 ++++++++++++-- .../dashboards/redis/redis_senitnel_dashboard.json | 14 ++++++++++++-- .../dashboards/redis/redis_shards_dashboard.json | 14 ++++++++++++-- .../dashboards/redis/redis_summary_dashboard.json | 14 ++++++++++++-- 23 files changed, 270 insertions(+), 45 deletions(-) diff --git a/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json index 0bfe55f6a..2ce17fa26 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json @@ -3659,17 +3659,22 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(jvm_info, namespace)", "refId": "StandardVariableQuery" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", "tagsQuery": "", - "type": "query", "useTags": false }, { diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json index 67ba56186..23f8e16df 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json @@ -1437,7 +1437,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(kube_namespace_labels,namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1445,7 +1451,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -1465,7 +1470,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "label_values(kubedb_com_mariadb_status_phase{namespace=~\"$namespace\"},app)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1473,7 +1484,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json index 25886526a..1fd83b9ff 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json @@ -549,7 +549,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(kube_namespace_labels,namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -557,7 +563,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -577,7 +582,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "label_values(kubedb_com_mariadb_status_phase{namespace=~\"$namespace\"},app)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -585,7 +596,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json index 3a38f4b86..ae5827368 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json @@ -3453,7 +3453,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(kube_namespace_labels,namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -3461,7 +3467,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -3481,7 +3486,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "label_values(kubedb_com_mariadb_status_phase{namespace=~\"$namespace\"},app)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -3489,7 +3500,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json index e3e027dd0..874c0f52c 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json @@ -2877,10 +2877,16 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(kube_namespace_labels,namespace)", "refId": "Prometheus-namespace-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -2888,7 +2894,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -2908,10 +2913,16 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": { "query": "label_values(kubedb_com_mariadb_status_phase{namespace=~\"$namespace\"},app)", "refId": "Prometheus-app-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -2919,7 +2930,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json index 7cb70d5b8..b96e795fa 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json @@ -1267,7 +1267,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(kube_namespace_labels,namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1275,7 +1281,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -1295,7 +1300,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "label_values(kubedb_com_mysql_status_phase{namespace=~\"$namespace\"},app)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1303,7 +1314,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json index 201070f52..11fb77807 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json @@ -1577,7 +1577,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(kube_namespace_labels,namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1585,7 +1591,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -1605,7 +1610,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "label_values(kubedb_com_mysql_status_phase{namespace=~\"$namespace\"},app)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1613,7 +1624,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json index 292bdb281..522d491cf 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json @@ -3453,7 +3453,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(kube_namespace_labels,namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -3461,7 +3467,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -3481,7 +3486,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "label_values(kubedb_com_mysql_status_phase{namespace=~\"$namespace\"},app)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -3489,7 +3500,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json index e6ec8d475..c0bdf2421 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json @@ -2960,10 +2960,16 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(kube_namespace_labels,namespace)", "refId": "Prometheus-namespace-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -2971,7 +2977,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -2991,10 +2996,16 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": { "query": "label_values(kubedb_com_mysql_status_phase{namespace=~\"$namespace\"},app)", "refId": "Prometheus-app-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -3002,7 +3013,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json index 5e2ae9f76..80f5b8e3c 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json @@ -1437,7 +1437,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(kube_namespace_labels,namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1445,7 +1451,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -1465,7 +1470,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "label_values(mysql_up{namespace=~\"$namespace\"}, service)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1473,7 +1484,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json index 8fa633c61..c3e200250 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json @@ -549,7 +549,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(kube_namespace_labels,namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -557,7 +563,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -577,7 +582,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "label_values(mysql_up{namespace=~\"$namespace\"}, service)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -585,7 +596,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json index d1f2b62c2..1c88f1df6 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json @@ -3453,7 +3453,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(kube_namespace_labels,namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -3461,7 +3467,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -3481,7 +3486,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "label_values(mysql_up{namespace=~\"$namespace\"}, service)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -3489,7 +3500,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json index 0f8866f4e..eefb610df 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json @@ -2877,10 +2877,16 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(kube_namespace_labels,namespace)", "refId": "Prometheus-namespace-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -2888,7 +2894,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -2908,10 +2913,16 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": { "query": "label_values(kubedb_com_perconaxtradb_status_phase{namespace=~\"$namespace\"},app)", "refId": "Prometheus-app-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -2919,7 +2930,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json index b3737fb4e..67736cca0 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json @@ -1800,7 +1800,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(kube_namespace_labels,namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1808,7 +1814,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -1828,7 +1833,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "query_result(kubedb_com_postgres_created{namespace=\"$namespace\"})", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "/.*app=\"([^\"]+).*/", "skipUrlSync": false, @@ -1836,7 +1847,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json index 3e82ca2d2..c2e1e81b4 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json @@ -1595,7 +1595,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(kube_namespace_labels,namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1603,7 +1609,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -1623,7 +1628,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "query_result(kubedb_com_postgres_created{namespace=\"$namespace\"})", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "/.*app=\"([^\"]+).*/", "skipUrlSync": false, @@ -1631,7 +1642,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json index 7d3212c40..1589b8640 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json @@ -3336,10 +3336,16 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(kube_namespace_labels,namespace)", "refId": "Prometheus-namespace-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -3347,7 +3353,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -3367,10 +3372,16 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": { "query": "query_result(kubedb_com_postgres_created{namespace=\"$namespace\"})", "refId": "Prometheus-app-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "/.*app=\"([^\"]+).*/", "skipUrlSync": false, @@ -3378,7 +3389,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json index c4cc893dc..550dc2063 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json @@ -7754,10 +7754,16 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(kube_namespace_labels,namespace)", "refId": "StandardVariableQuery" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -7765,7 +7771,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -7785,10 +7790,16 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": { "query": "label_values(proxysql_uptime_seconds_total{namespace=~\"$namespace\"}, service)", "refId": "StandardVariableQuery" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -7796,7 +7807,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json index 23e4a328d..e381aec51 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json @@ -1248,10 +1248,16 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(kube_namespace_labels,namespace)", "refId": "Prometheus-namespace-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1259,7 +1265,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -1279,10 +1284,16 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": { "query": "label_values(proxysql_uptime_seconds_total{namespace=~\"$namespace\"}, service)", "refId": "StandardVariableQuery" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1290,7 +1301,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json index f545ba15b..62dee4327 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json @@ -2328,10 +2328,16 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(kube_namespace_labels,namespace)", "refId": "Prometheus-namespace-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -2339,7 +2345,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -2359,10 +2364,16 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": { "query": "label_values(kubedb_com_proxysql_status_phase{namespace=~\"$namespace\"},app)", "refId": "StandardVariableQuery" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -2370,7 +2381,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json index feeda3276..a36c5e023 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json @@ -1677,7 +1677,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(redis_up, namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 2, "regex": "", "skipUrlSync": false, @@ -1685,7 +1691,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -1705,7 +1710,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "query_result(kubedb_com_redis_created{namespace=\"$namespace\"})", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "/.*app=\"([^\"]+).*/", "skipUrlSync": false, @@ -1713,7 +1724,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json index 4fffac553..e2282fb9f 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json @@ -1891,10 +1891,16 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(redis_up, namespace)", "refId": "Prometheus-namespace-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 2, "regex": "", "skipUrlSync": false, @@ -1902,7 +1908,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -1922,10 +1927,16 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": { "query": "query_result(kubedb_com_redissentinel_created{namespace=\"$namespace\"})", "refId": "StandardVariableQuery" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "/.*name=\"([^\"]+).*/", "skipUrlSync": false, @@ -1933,7 +1944,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json index 9e1e56449..2af933a9e 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json @@ -694,7 +694,13 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": "label_values(redis_up, namespace)", + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 2, "regex": "", "skipUrlSync": false, @@ -702,7 +708,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -722,7 +727,13 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": "query_result(kubedb_com_redis_created{namespace=\"$namespace\"})", + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "/.*app=\"([^\"]+).*/", "skipUrlSync": false, @@ -730,7 +741,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json index 9d4aa94eb..7b1106d56 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json @@ -3362,10 +3362,16 @@ "multi": false, "name": "namespace", "options": [], + {{- if $shared }} "query": { "query": "label_values(kube_namespace_labels,namespace)", "refId": "Prometheus-namespace-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -3373,7 +3379,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false }, { @@ -3393,10 +3398,16 @@ "multi": false, "name": "app", "options": [], + {{- if $shared }} "query": { "query": "label_values(kubedb_com_redis_status_phase{namespace=~\"$namespace\"},app)", "refId": "Prometheus-app-Variable-Query" }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} "refresh": 1, "regex": "", "skipUrlSync": false, @@ -3404,7 +3415,6 @@ "tagValuesQuery": "", "tags": [], "tagsQuery": "", - "type": "query", "useTags": false } ] From 790528f534d0b8381e5a9c3c22e1429d43bfc3da Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 09:24:23 -0800 Subject: [PATCH 08/19] fix Signed-off-by: Tamal Saha --- .../postgres_databases_dashboard.json | 12 +++--- .../postgres/postgres_summary_dashboard.json | 2 +- .../proxysql/proxysql-database.json | 38 +++++++++---------- charts/kubedb-grafana-dashboards/values.yaml | 4 +- 4 files changed, 27 insertions(+), 29 deletions(-) diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json index 67736cca0..2967345e4 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json @@ -910,7 +910,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{datname}}", + "legendFormat": {{ `"{{datname}}"` }}, "refId": "A", "step": 2 } @@ -1015,7 +1015,7 @@ "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{datname}}", + "legendFormat": {{ `"{{datname}}"` }}, "refId": "A", "step": 2 } @@ -1255,7 +1255,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{datname}} conflicts", + "legendFormat": {{ `"{{datname}} conflicts"` }}, "refId": "B" }, { @@ -1264,7 +1264,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{datname}} deadlocks", + "legendFormat": {{ `"{{datname}} deadlocks"` }}, "refId": "A" } ], @@ -1366,7 +1366,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{ datname }}", + "legendFormat": {{ `"{{datname}}"` }}, "refId": "A" } ], @@ -1469,7 +1469,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{datname}}", + "legendFormat": {{ `"{{datname}}"` }}, "refId": "A" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json index 1589b8640..b95fa3188 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json @@ -988,7 +988,7 @@ "expr": "sum(pg_stat_activity_count{namespace=\"$namespace\",pod=~\"$app-\\\\d+$\"}) by (state)", "instant": false, "interval": "", - "legendFormat": "{{ `"{{state}}"` }}", + "legendFormat": {{ `"{{state}}"` }}, "refId": "A" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json index 550dc2063..65dda067d 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json @@ -1438,7 +1438,7 @@ "exemplar": true, "expr": "rate(proxysql_query_cache_count_get_total{namespace=~\"$namespace\",service=\"$app\"}[5m]) ", "interval": "", - "legendFormat": "{{pod}}:{{status}}", + "legendFormat": {{ `"{{pod}}:{{status}}"` }}, "refId": "A" } ], @@ -1532,7 +1532,7 @@ "exemplar": true, "expr": "rate(proxysql_query_cache_count_set_total{namespace=~\"$namespace\",service=\"$app\"}[5m]) ", "interval": "", - "legendFormat": "{{pod}}:{{status}}", + "legendFormat": {{ `"{{pod}}:{{status}}"` }}, "refId": "A" } ], @@ -1626,7 +1626,7 @@ "exemplar": true, "expr": "rate(proxysql_query_cache_bytes_total{namespace=~\"$namespace\",service=\"$app\"}[5m]) ", "interval": "", - "legendFormat": "{{pod}}:{{op}}", + "legendFormat": {{ `"{{pod}}:{{op}}"` }}, "refId": "A" } ], @@ -1720,7 +1720,7 @@ "exemplar": true, "expr": "rate(proxysql_query_cache_memory_bytes{namespace=~\"$namespace\",service=\"$app\"}[5m]) ", "interval": "", - "legendFormat": "{{pod}}:{{op}}", + "legendFormat": {{ `"{{pod}}:{{op}}"` }}, "refId": "A" } ], @@ -1814,7 +1814,7 @@ "exemplar": true, "expr": "rate(proxysql_query_cache_entries_total{namespace=~\"$namespace\",service=\"$app\"}[5m]) ", "interval": "", - "legendFormat": "{{pod}}:{{op}}", + "legendFormat": {{ `"{{pod}}:{{op}}"` }}, "refId": "A" } ], @@ -2314,7 +2314,7 @@ "exemplar": true, "expr": "sum(rate(proxysql_cluster_pulled_total{namespace=~\"$namespace\",service=\"$app\",module_name=~\"mysql_variables|admin_variables|proxysql_servers|mysql_servers\"}[1m])) by(module_name,status)", "interval": "", - "legendFormat": "{{module_name}} : {{status}}", + "legendFormat": {{ `"{{module_name}} : {{status}}"` }}, "refId": "A" } ], @@ -2408,7 +2408,7 @@ "exemplar": true, "expr": "sum(rate(proxysql_cluster_syn_conflict_total{namespace=~\"$namespace\",service=\"$app\",module_name=~\"mysql_variables|admin_variables|proxysql_servers|mysql_servers\"}[1m])) by(module_name)", "interval": "", - "legendFormat": "{{module_name}}", + "legendFormat": {{ `"{{module_name}}"` }}, "refId": "A" } ], @@ -2517,7 +2517,7 @@ "exemplar": true, "expr": "sum(rate(proxysql_server_connections_total{namespace=~\"$namespace\",service=\"$app\"}[1m])) by(status)", "interval": "", - "legendFormat": "{{status}}", + "legendFormat": {{ `"{{status}}"` }}, "refId": "A" } ], @@ -2611,7 +2611,7 @@ "exemplar": true, "expr": "sum(rate(proxysql_client_connections_total{namespace=~\"$namespace\",service=\"$app\"}[1m])) by(status)", "interval": "", - "legendFormat": "{{status}}", + "legendFormat": {{ `"{{status}}"` }}, "refId": "A" } ], @@ -2893,7 +2893,7 @@ "exemplar": true, "expr": "proxysql_connpool_conns_latency_us{namespace=~\"$namespace\",service=\"$app\",hostgroup=\"3\"}", "interval": "", - "legendFormat": "{{pod}}:{{endpoint}}", + "legendFormat": {{ `"{{pod}}:{{endpoint}}"` }}, "refId": "A" } ], @@ -3084,7 +3084,7 @@ "expr": "proxysql_connpool_conns_status{namespace=~\"$namespace\",service=\"$app\",hostgroup=\"3\"}", "instant": false, "interval": "", - "legendFormat": "{{pod}} : {{endpoint}}", + "legendFormat": {{ `"{{pod}} : {{endpoint}}"` }}, "refId": "A" } ], @@ -3181,7 +3181,7 @@ "expr": "proxysql_connpool_conns_status{namespace=~\"$namespace\",service=\"$app\",hostgroup=\"2\"}", "instant": false, "interval": "", - "legendFormat": "{{pod}} : {{endpoint}}", + "legendFormat": {{ `"{{pod}} : {{endpoint}}"` }}, "refId": "A" } ], @@ -3278,7 +3278,7 @@ "expr": "sum(proxysql_connpool_conns{namespace=~\"$namespace\",service=\"$app\",hostgroup=\"3\"}) by(status,pod)", "instant": false, "interval": "", - "legendFormat": "{{pod}} : {{status}}", + "legendFormat": {{ `"{{pod}} : {{status}}"` }}, "refId": "A" } ], @@ -3375,7 +3375,7 @@ "expr": "sum(proxysql_connpool_conns{namespace=~\"$namespace\",service=\"$app\",hostgroup=\"2\"}) by(status,pod)", "instant": false, "interval": "", - "legendFormat": "{{pod}} : {{status}}", + "legendFormat": {{ `"{{pod}} : {{status}}"` }}, "refId": "A" } ], @@ -3957,7 +3957,7 @@ "expr": "sum(rate(proxysql_connpool_data_bytes_total{namespace=~\"$namespace\",service=\"$app\"}[1m])) by(hostgroup,traffic_flow)", "instant": false, "interval": "", - "legendFormat": "HG {{hostgroup}} : Data {{traffic_flow}}", + "legendFormat": {{ `"HG {{hostgroup}} : Data {{traffic_flow}}"` }}, "refId": "A" } ], @@ -4054,7 +4054,7 @@ "expr": "sum(rate(proxysql_connpool_conns_total{namespace=~\"$namespace\",service=\"$app\"}[1m])) by(hostgroup)", "instant": false, "interval": "", - "legendFormat": "HG {{hostgroup}} ", + "legendFormat": {{ `"HG {{hostgroup}} "` }}, "refId": "A" } ], @@ -4151,7 +4151,7 @@ "expr": "sum(rate(proxysql_connpool_conns_queries_total{namespace=~\"$namespace\",service=\"$app\"}[1m])) by(hostgroup)", "instant": false, "interval": "", - "legendFormat": "HG {{hostgroup}} ", + "legendFormat": {{ `"HG {{hostgroup}}"` }}, "refId": "A" } ], @@ -6091,7 +6091,7 @@ "exemplar": true, "expr": "sum(rate(proxysql_com_backend_stmt_total{namespace=~\"$namespace\",service=\"$app\"}[1m])) by(op)", "interval": "", - "legendFormat": "{{op}}", + "legendFormat": {{ `"{{op}}"` }}, "refId": "A" } ], @@ -6185,7 +6185,7 @@ "exemplar": true, "expr": "sum(rate(proxysql_com_frontend_stmt_total{namespace=~\"$namespace\",service=\"$app\"}[1m])) by(op)", "interval": "", - "legendFormat": "{{op}}", + "legendFormat": {{ `"{{op}}"` }}, "refId": "A" } ], diff --git a/charts/kubedb-grafana-dashboards/values.yaml b/charts/kubedb-grafana-dashboards/values.yaml index a0d408bfe..9d70b81b4 100644 --- a/charts/kubedb-grafana-dashboards/values.yaml +++ b/charts/kubedb-grafana-dashboards/values.yaml @@ -9,13 +9,11 @@ fullnameOverride: "" # List of resources for which dashboards will be applied resources: # +doc-gen:break - - elasticsearch - # - elasticsearch # - mariadb # - mongodb # - mysql - # - postgres + - postgres # - redis # - proxysql From 144306be190dec7fa0786bfc6d89e2071e674840 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 09:54:36 -0800 Subject: [PATCH 09/19] rm definition Signed-off-by: Tamal Saha --- .../elasticsearch/elasticsearch_database_dashboard.json | 2 -- .../dashboards/elasticsearch/elasticsearch_pod_dashboard.json | 2 -- .../elasticsearch/elasticsearch_summary_dashboard.json | 2 -- .../dashboards/kafka/kafka_database_dashboard.json | 1 - .../dashboards/mariadb/mariadb-database.json | 2 -- .../dashboards/mariadb/mariadb-galera.json | 2 -- .../dashboards/mariadb/mariadb-pod.json | 2 -- .../dashboards/mariadb/mariadb-summary.json | 2 -- .../dashboards/mongodb/mongodb-database-replset-dashboard.json | 2 -- .../dashboards/mongodb/mongodb-pod-dashboard.json | 2 -- .../dashboards/mongodb/mongodb-summary-dashboard.json | 1 - .../dashboards/mysql/mysql_database_dashboard.json | 2 -- .../dashboards/mysql/mysql_group_replication.json | 2 -- .../dashboards/mysql/mysql_pod_dashboard.json | 2 -- .../dashboards/mysql/mysql_summary_dashboard.json | 2 -- .../dashboards/perconaxtradb/perconaxtradb-database.json | 2 -- .../dashboards/perconaxtradb/perconaxtradb-galera.json | 2 -- .../dashboards/perconaxtradb/perconaxtradb-pod.json | 2 -- .../dashboards/perconaxtradb/perconaxtradb-summary.json | 2 -- .../dashboards/postgres/postgres_databases_dashboard.json | 2 -- .../dashboards/postgres/postgres_pods_dashboard.json | 2 -- .../dashboards/postgres/postgres_summary_dashboard.json | 2 -- .../dashboards/proxysql/proxysql-database.json | 2 -- .../dashboards/proxysql/proxysql-pod.json | 2 -- .../dashboards/proxysql/proxysql-summary.json | 2 -- .../dashboards/redis/redis_pod_dashboard.json | 2 -- .../dashboards/redis/redis_senitnel_dashboard.json | 2 -- .../dashboards/redis/redis_shards_dashboard.json | 2 -- .../dashboards/redis/redis_summary_dashboard.json | 2 -- 29 files changed, 56 deletions(-) diff --git a/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_database_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_database_dashboard.json index 448907271..ca76f35f7 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_database_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_database_dashboard.json @@ -2009,7 +2009,6 @@ "value": "default" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -2046,7 +2045,6 @@ ] }, "datasource": "${datasource}", - "definition": "label_values(elasticsearch_cluster_health_status{namespace=~\"$namespace\"},cluster)", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_pod_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_pod_dashboard.json index 3fbaf263d..4a2b6c2e5 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_pod_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_pod_dashboard.json @@ -2188,7 +2188,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -2221,7 +2220,6 @@ "value": "sample-es-cpu" }, "datasource": "${datasource}", - "definition": "label_values(elasticsearch_cluster_health_status{namespace=~\"$namespace\"},cluster)", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_summary_dashboard.json index d8dfa4517..b3f898b2a 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/elasticsearch/elasticsearch_summary_dashboard.json @@ -2999,7 +2999,6 @@ "value": "default" }, "datasource": null, - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -3035,7 +3034,6 @@ "value": "es-prod" }, "datasource": null, - "definition": "label_values(kubedb_com_elasticsearch_status_phase{namespace=~\"$namespace\"},app)", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json index 2ce17fa26..0c4392c31 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/kafka/kafka_database_dashboard.json @@ -3652,7 +3652,6 @@ "type": "prometheus", "uid": "$datasource" }, - "definition": "label_values(jvm_info, namespace)", "hide": 0, "includeAll": false, "label": "", diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json index 23f8e16df..76486c0a2 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-database.json @@ -1428,7 +1428,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -1461,7 +1460,6 @@ "value": "sample-mariadb-stats" }, "datasource": "${datasource}", - "definition": "label_values(kubedb_com_mariadb_status_phase{namespace=~\"$namespace\"},app)", "description": "MariaDB stats service name", "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json index 1fd83b9ff..f71e548d8 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-galera.json @@ -540,7 +540,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -573,7 +572,6 @@ "value": "sample-mariadb-stats" }, "datasource": "${datasource}", - "definition": "label_values(kubedb_com_mariadb_status_phase{namespace=~\"$namespace\"},app)", "description": "", "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json index ae5827368..0e38aa259 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-pod.json @@ -3444,7 +3444,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -3477,7 +3476,6 @@ "value": "sample-mariadb-stats" }, "datasource": "${datasource}", - "definition": "label_values(kubedb_com_mariadb_status_phase{namespace=~\"$namespace\"},app)", "description": "", "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json index 874c0f52c..478c72a43 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mariadb/mariadb-summary.json @@ -2868,7 +2868,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -2904,7 +2903,6 @@ "value": "mariadb-galera" }, "datasource": "${datasource}", - "definition": "label_values(kubedb_com_mariadb_status_phase{namespace=~\"$namespace\"},app)", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-database-replset-dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-database-replset-dashboard.json index b7c1a7f49..382c7c604 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-database-replset-dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-database-replset-dashboard.json @@ -1257,7 +1257,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -1294,7 +1293,6 @@ "value": "shard1" }, "datasource": "${datasource}", - "definition": "", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-pod-dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-pod-dashboard.json index 1504296da..16fb18372 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-pod-dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-pod-dashboard.json @@ -1818,7 +1818,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -1854,7 +1853,6 @@ "value": "mg-rs" }, "datasource": "${datasource}", - "definition": "label_values(kubedb_com_mongodb_status_phase{namespace=~\"$namespace\"},app)", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-summary-dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-summary-dashboard.json index a8f0d0f59..f2071748f 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-summary-dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mongodb/mongodb-summary-dashboard.json @@ -2960,7 +2960,6 @@ "value": "mg4" }, "datasource": "${datasource}", - "definition": "label_values(kubedb_com_mongodb_status_phase{namespace=~\"$namespace\"},app)", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json index b96e795fa..0be9170e8 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_database_dashboard.json @@ -1258,7 +1258,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -1291,7 +1290,6 @@ "value": "sample-mysql-stats" }, "datasource": "${datasource}", - "definition": "label_values(kubedb_com_mysql_status_phase{namespace=~\"$namespace\"},app)", "description": "", "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json index 11fb77807..349a737e9 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_group_replication.json @@ -1568,7 +1568,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -1601,7 +1600,6 @@ "value": "old-mysql-stats" }, "datasource": "${datasource}", - "definition": "label_values(kubedb_com_mysql_status_phase{namespace=~\"$namespace\"},app)", "description": "", "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json index 522d491cf..413b69784 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_pod_dashboard.json @@ -3444,7 +3444,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -3477,7 +3476,6 @@ "value": "sample-mysql-stats" }, "datasource": "${datasource}", - "definition": "label_values(kubedb_com_mysql_status_phase{namespace=~\"$namespace\"},app)", "description": "", "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json index c0bdf2421..b910a74f6 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/mysql/mysql_summary_dashboard.json @@ -2951,7 +2951,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -2987,7 +2986,6 @@ "value": "coreos-prom-mysql" }, "datasource": "${datasource}", - "definition": "label_values(kubedb_com_mysql_status_phase{namespace=~\"$namespace\"},app)", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json index 80f5b8e3c..b44c38250 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-database.json @@ -1428,7 +1428,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -1461,7 +1460,6 @@ "value": "sample-perconaxtradb-stats" }, "datasource": "${datasource}", - "definition": "label_values(mysql_up{namespace=~\"$namespace\"}, service)", "description": "PerconaXtraDB stats service name", "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json index c3e200250..e0a153c97 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json @@ -540,7 +540,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -573,7 +572,6 @@ "value": "sample-perconaxtradb-stats" }, "datasource": "${datasource}", - "definition": "label_values(mysql_up{namespace=~\"$namespace\"}, service)", "description": "", "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json index 1c88f1df6..37b04cdc5 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json @@ -3444,7 +3444,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -3477,7 +3476,6 @@ "value": "sample-perconaxtradb-stats" }, "datasource": "${datasource}", - "definition": "label_values(mysql_up{namespace=~\"$namespace\"}, service)", "description": "", "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json index eefb610df..403ae876f 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json @@ -2868,7 +2868,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -2904,7 +2903,6 @@ "value": "coreos-prom-px" }, "datasource": "${datasource}", - "definition": "label_values(kubedb_com_perconaxtradb_status_phase{namespace=~\"$namespace\"},app)", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json index 2967345e4..848288bd7 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_databases_dashboard.json @@ -1791,7 +1791,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -1824,7 +1823,6 @@ "value": "ps-demo" }, "datasource": "${datasource}", - "definition": "query_result(kubedb_com_postgres_created{namespace=\"$namespace\"})", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json index c2e1e81b4..9f8578cd1 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_pods_dashboard.json @@ -1586,7 +1586,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -1619,7 +1618,6 @@ "value": "ps-demo" }, "datasource": "${datasource}", - "definition": "query_result(kubedb_com_postgres_created{namespace=\"$namespace\"})", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json index b95fa3188..f0709c279 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json @@ -3327,7 +3327,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -3363,7 +3362,6 @@ "value": "coreos-prom-postgres" }, "datasource": "${datasource}", - "definition": "query_result(kubedb_com_postgres_created{namespace=\"$namespace\"})", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json index 65dda067d..0dffe30a4 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-database.json @@ -7745,7 +7745,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -7781,7 +7780,6 @@ "value": "proxy-server-stats" }, "datasource": "${datasource}", - "definition": "label_values(proxysql_uptime_seconds_total{namespace=~\"$namespace\"}, service)", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json index e381aec51..beb383fdc 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-pod.json @@ -1239,7 +1239,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -1275,7 +1274,6 @@ "value": "proxy-mysql-stats" }, "datasource": "${datasource}", - "definition": "label_values(proxysql_uptime_seconds_total{namespace=~\"$namespace\"}, service)", "description": "", "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json index 62dee4327..beb4817de 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/proxysql/proxysql-summary.json @@ -2319,7 +2319,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -2355,7 +2354,6 @@ "value": "proxy-server" }, "datasource": "${datasource}", - "definition": "label_values(kubedb_com_proxysql_status_phase{namespace=~\"$namespace\"},app)", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json index a36c5e023..184dd0f86 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_pod_dashboard.json @@ -1668,7 +1668,6 @@ "value": "demo" }, "datasource": "Prometheus", - "definition": "label_values(redis_up, namespace)", "description": null, "error": null, "hide": 0, @@ -1701,7 +1700,6 @@ "value": "demo-rd" }, "datasource": null, - "definition": "query_result(kubedb_com_redis_created{namespace=\"$namespace\"})", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json index e2282fb9f..507276fb5 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_senitnel_dashboard.json @@ -1882,7 +1882,6 @@ "value": "demo" }, "datasource": "Prometheus", - "definition": "label_values(redis_up, namespace)", "description": null, "error": null, "hide": 0, @@ -1918,7 +1917,6 @@ "value": "sentinel" }, "datasource": null, - "definition": "query_result(kubedb_com_redissentinel_created{namespace=\"$namespace\"})", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json index 2af933a9e..6d466147a 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_shards_dashboard.json @@ -685,7 +685,6 @@ "value": "demo" }, "datasource": "Prometheus", - "definition": "label_values(redis_up, namespace)", "description": null, "error": null, "hide": 0, @@ -718,7 +717,6 @@ "value": "demo-rd" }, "datasource": null, - "definition": "query_result(kubedb_com_redis_created{namespace=\"$namespace\"})", "description": null, "error": null, "hide": 0, diff --git a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json index 7b1106d56..6f79ba56c 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/redis/redis_summary_dashboard.json @@ -3353,7 +3353,6 @@ "value": "demo" }, "datasource": "${datasource}", - "definition": "label_values(kube_namespace_labels,namespace)", "description": null, "error": null, "hide": 0, @@ -3389,7 +3388,6 @@ "value": "redis-sentinel" }, "datasource": "${datasource}", - "definition": "label_values(kubedb_com_redis_status_phase{namespace=~\"$namespace\"},app)", "description": null, "error": null, "hide": 0, From ef6469d0b17a9419de97068d365317426e303618 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 10:01:17 -0800 Subject: [PATCH 10/19] dash replacement Signed-off-by: Tamal Saha --- charts/kubedb-grafana-dashboards/templates/configmap.yaml | 6 +++++- charts/kubedb-grafana-dashboards/templates/dashboard.yaml | 6 +++++- charts/kubedb-grafana-dashboards/values.yaml | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/charts/kubedb-grafana-dashboards/templates/configmap.yaml b/charts/kubedb-grafana-dashboards/templates/configmap.yaml index 15b01c6a8..249386009 100644 --- a/charts/kubedb-grafana-dashboards/templates/configmap.yaml +++ b/charts/kubedb-grafana-dashboards/templates/configmap.yaml @@ -11,7 +11,11 @@ metadata: data: {{- range $r := .Values.resources }} {{- range $path, $_ := $.Files.Glob (printf "dashboards/%s/**.json" $r) }} - {{- $dasboard := omit (tpl ($.Files.Get $path) $ | mustFromJson) "id" "uid" -}} + {{- $dashtpl := $.Files.Get $path }} + {{- range $k, $v := $.Values.dashboard.replacements }} + {{- $dashtpl = $dashtpl | replace $k $v }} + {{- end }} + {{- $dasboard := omit (tpl $dashtpl $ | mustFromJson) "id" "uid" -}} {{ $path | replace "/" "-" | nindent 2 }}: | {{- dict "dashboard" $dasboard diff --git a/charts/kubedb-grafana-dashboards/templates/dashboard.yaml b/charts/kubedb-grafana-dashboards/templates/dashboard.yaml index a2bea5fa3..4262092eb 100644 --- a/charts/kubedb-grafana-dashboards/templates/dashboard.yaml +++ b/charts/kubedb-grafana-dashboards/templates/dashboard.yaml @@ -24,8 +24,12 @@ spec: namespace: {{ . }} {{- end }} {{- end }} + {{- $dashtpl := $.Files.Get $path }} + {{- range $k, $v := $.Values.dashboard.replacements }} + {{- $dashtpl = $dashtpl | replace $k $v }} + {{- end }} model: - {{- omit (tpl ($.Files.Get $path) $ | mustFromJson) "id" "uid" | toYaml | nindent 4 }} + {{- omit (tpl $dashtpl $ | mustFromJson) "id" "uid" | toYaml | nindent 4 }} {{- with $.Values.dashboard.folderID }} folderID: {{ . }} {{- end }} diff --git a/charts/kubedb-grafana-dashboards/values.yaml b/charts/kubedb-grafana-dashboards/values.yaml index 9d70b81b4..8b0b341fa 100644 --- a/charts/kubedb-grafana-dashboards/values.yaml +++ b/charts/kubedb-grafana-dashboards/values.yaml @@ -27,6 +27,10 @@ dashboard: title: false # If true, datasource will be hardcoded in the dashboard datasource: false + replacements: + job=\"kube-state-metrics\": job=\"kubernetes-service-endpoints\" + job=\"kubelet\": job=\"kubernetes-nodes-cadvisor\" + job=\"repl-stats\": job=\"kubedb-databases\" grafana: # Name of Grafana Appbinding where these dashboards are applied From 988b2fc47f16959a7cfadf4e8f313f1d6a4368c7 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 10:08:05 -0800 Subject: [PATCH 11/19] Add grafana values Signed-off-by: Tamal Saha --- charts/kubedb-grafana-dashboards/values.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/kubedb-grafana-dashboards/values.yaml b/charts/kubedb-grafana-dashboards/values.yaml index 8b0b341fa..4b71875d0 100644 --- a/charts/kubedb-grafana-dashboards/values.yaml +++ b/charts/kubedb-grafana-dashboards/values.yaml @@ -37,6 +37,10 @@ grafana: name: "" # Namespace of Grafana Appbinding where these dashboards are applied namespace: "" + version: 8.2.3 + jobName: kubedb-databases + url: "" + apikey: "" app: name: "mymg" From 1e232d2c84a9f169e7a6320076cad3fe6aee2604 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 10:19:18 -0800 Subject: [PATCH 12/19] Update values Signed-off-by: Tamal Saha --- charts/kubedb-grafana-dashboards/README.md | 31 ++++++++++++------- .../templates/configmap.yaml | 4 +++ charts/kubedb-grafana-dashboards/values.yaml | 16 +++++----- 3 files changed, 32 insertions(+), 19 deletions(-) diff --git a/charts/kubedb-grafana-dashboards/README.md b/charts/kubedb-grafana-dashboards/README.md index f0c519a06..244405b49 100644 --- a/charts/kubedb-grafana-dashboards/README.md +++ b/charts/kubedb-grafana-dashboards/README.md @@ -45,17 +45,26 @@ The command removes all the Kubernetes components associated with the chart and The following table lists the configurable parameters of the `kubedb-grafana-dashboards` chart and their default values. -| Parameter | Description | Default | -|---------------------------------|--------------------------------------------------------------------|------------------------------------------------------------------------------------------| -| nameOverride | Overrides name template | "" | -| fullnameOverride | Overrides fullname template | "" | -| resources | List of resources for which dashboards will be applied | ["elasticsearch","mariadb","mongodb","mysql","postgres","redis","proxysql"] | -| dashboard.folderID | ID of Grafana folder where these dashboards will be applied | 0 | -| dashboard.overwrite | If true, dashboard with matching uid will be overwritten | true | -| dashboard.templatize.title | If true, datasource will be prefixed to dashboard name | false | -| dashboard.templatize.datasource | If true, datasource will be hardcoded in the dashboard | false | -| grafana.name | Name of Grafana Appbinding where these dashboards are applied | "" | -| grafana.namespace | Namespace of Grafana Appbinding where these dashboards are applied | "" | +| Parameter | Description | Default | +|---------------------------------------------------|--------------------------------------------------------------------|------------------------------------------------------------------------------------------| +| nameOverride | Overrides name template | "" | +| fullnameOverride | Overrides fullname template | "" | +| resources | List of resources for which dashboards will be applied | ["elasticsearch","mariadb","mongodb","mysql","postgres","redis","proxysql"] | +| dashboard.folderID | ID of Grafana folder where these dashboards will be applied | 0 | +| dashboard.overwrite | If true, dashboard with matching uid will be overwritten | true | +| dashboard.templatize.title | If true, datasource will be prefixed to dashboard name | false | +| dashboard.templatize.datasource | If true, datasource will be hardcoded in the dashboard | false | +| dashboard.replacements.job=\"kube-state-metrics\" | | job=\"kubernetes-service-endpoints\" | +| dashboard.replacements.job=\"kubelet\" | | job=\"kubernetes-nodes-cadvisor\" | +| dashboard.replacements.job=\"repl-stats\" | | job=\"kubedb-databases\" | +| grafana.name | Name of Grafana Appbinding where these dashboards are applied | "" | +| grafana.namespace | Namespace of Grafana Appbinding where these dashboards are applied | "" | +| grafana.version | | 8.2.3 | +| grafana.jobName | | kubedb-databases | +| grafana.url | | "" | +| grafana.apikey | | "" | +| app.name | | "" | +| app.namespace | | "" | Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example: diff --git a/charts/kubedb-grafana-dashboards/templates/configmap.yaml b/charts/kubedb-grafana-dashboards/templates/configmap.yaml index 249386009..312cda48d 100644 --- a/charts/kubedb-grafana-dashboards/templates/configmap.yaml +++ b/charts/kubedb-grafana-dashboards/templates/configmap.yaml @@ -1,6 +1,10 @@ {{ $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") }} {{ if not $shared }} +{{- if not (eq (len .Values.resources) 1) }} +{{- fail "Only one .Values.resources can be used when app name or namespace is set!" }} +{{- end }} + apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/kubedb-grafana-dashboards/values.yaml b/charts/kubedb-grafana-dashboards/values.yaml index 4b71875d0..72991b7c3 100644 --- a/charts/kubedb-grafana-dashboards/values.yaml +++ b/charts/kubedb-grafana-dashboards/values.yaml @@ -9,13 +9,13 @@ fullnameOverride: "" # List of resources for which dashboards will be applied resources: # +doc-gen:break - # - elasticsearch - # - mariadb - # - mongodb - # - mysql + - elasticsearch + - mariadb + - mongodb + - mysql - postgres - # - redis - # - proxysql + - redis + - proxysql dashboard: # ID of Grafana folder where these dashboards will be applied @@ -43,5 +43,5 @@ grafana: apikey: "" app: - name: "mymg" - namespace: "demo" + name: "" + namespace: "" From f661eb5b67ccb276a0cfcfc518b7e7c277dcdf26 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 10:28:33 -0800 Subject: [PATCH 13/19] fix Signed-off-by: Tamal Saha --- .../templates/configmap.yaml | 4 ++-- .../templates/dashboard.yaml | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/charts/kubedb-grafana-dashboards/templates/configmap.yaml b/charts/kubedb-grafana-dashboards/templates/configmap.yaml index 312cda48d..c604c8014 100644 --- a/charts/kubedb-grafana-dashboards/templates/configmap.yaml +++ b/charts/kubedb-grafana-dashboards/templates/configmap.yaml @@ -19,10 +19,10 @@ data: {{- range $k, $v := $.Values.dashboard.replacements }} {{- $dashtpl = $dashtpl | replace $k $v }} {{- end }} - {{- $dasboard := omit (tpl $dashtpl $ | mustFromJson) "id" "uid" -}} + {{- $dashboard := omit (tpl $dashtpl $ | mustFromJson) "id" "uid" -}} {{ $path | replace "/" "-" | nindent 2 }}: | {{- dict - "dashboard" $dasboard + "dashboard" $dashboard "folderId" $.Values.dashboard.folderID "overwrite" $.Values.dashboard.overwrite | toJson | nindent 4 -}} {{- end }} diff --git a/charts/kubedb-grafana-dashboards/templates/dashboard.yaml b/charts/kubedb-grafana-dashboards/templates/dashboard.yaml index 4262092eb..a6e5bda43 100644 --- a/charts/kubedb-grafana-dashboards/templates/dashboard.yaml +++ b/charts/kubedb-grafana-dashboards/templates/dashboard.yaml @@ -4,10 +4,17 @@ {{- $gkr := .Files.Get "data/resources.yaml" | fromYaml -}} {{ range $r := .Values.resources }} {{ range $path, $_ := $.Files.Glob (printf "dashboards/%s/**.json" $r) }} + +{{- $dashtpl := $.Files.Get $path }} +{{- range $k, $v := $.Values.dashboard.replacements }} + {{- $dashtpl = $dashtpl | replace $k $v }} +{{- end }} +{{- $dashboard := omit (tpl $dashtpl $ | mustFromJson) "id" "uid" -}} + apiVersion: openviz.dev/v1alpha1 kind: GrafanaDashboard metadata: - name: {{ prepend ((get ($.Files.Get $path | mustFromJson) "title") | lower | nospace | splitList "/" ) $.Values.grafana.name | compact | join "-" | trunc 63 | trimSuffix "-" }} + name: {{ prepend ((get $dashboard "title") | lower | nospace | splitList "/" ) $.Values.grafana.name | compact | join "-" | trunc 63 | trimSuffix "-" }} namespace: {{ $.Release.Namespace }} labels: k8s.io/group: kubedb.com @@ -24,12 +31,8 @@ spec: namespace: {{ . }} {{- end }} {{- end }} - {{- $dashtpl := $.Files.Get $path }} - {{- range $k, $v := $.Values.dashboard.replacements }} - {{- $dashtpl = $dashtpl | replace $k $v }} - {{- end }} model: - {{- omit (tpl $dashtpl $ | mustFromJson) "id" "uid" | toYaml | nindent 4 }} + {{- $dashboard | toYaml | nindent 4 }} {{- with $.Values.dashboard.folderID }} folderID: {{ . }} {{- end }} From 1d7b98d41957cd587ec750a7a06fec5baa4d1eb5 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 10:37:12 -0800 Subject: [PATCH 14/19] Update dashboard types Signed-off-by: Tamal Saha --- .github/workflows/ci.yml | 59 +++++++++++++++++++ charts/kubedb-grafana-dashboards/README.md | 42 ++++++------- .../data/resources.yaml | 9 ++- charts/kubedb-grafana-dashboards/values.yaml | 4 +- 4 files changed, 89 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07068d931..7d1f7cbd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,3 +153,62 @@ jobs: --namespace kubedb --create-namespace \ --set global.monitoring.agent=prometheus.io/builtin helm delete kubedb-opscenter --namespace kubedb + + - name: Test Grafana Dashboards + run: | + echo "all db dashboards" + helm template charts/kubedb-grafana-dashboards + echo "-----------------------------------------" + echo "elasticsearch dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=elasticsearch \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "kafka dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=kafka \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "mariadb dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=mariadb \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "mongodb dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=mongodb \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "mysql dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=mysql \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "perconaxtradb dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=perconaxtradb \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "postgres dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=postgres \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "proxysql dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=proxysql \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "redis dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=redis \ + --set app.name=mydb \ + --set app.namespace=demo diff --git a/charts/kubedb-grafana-dashboards/README.md b/charts/kubedb-grafana-dashboards/README.md index 244405b49..8a75f84a1 100644 --- a/charts/kubedb-grafana-dashboards/README.md +++ b/charts/kubedb-grafana-dashboards/README.md @@ -45,32 +45,32 @@ The command removes all the Kubernetes components associated with the chart and The following table lists the configurable parameters of the `kubedb-grafana-dashboards` chart and their default values. -| Parameter | Description | Default | -|---------------------------------------------------|--------------------------------------------------------------------|------------------------------------------------------------------------------------------| -| nameOverride | Overrides name template | "" | -| fullnameOverride | Overrides fullname template | "" | -| resources | List of resources for which dashboards will be applied | ["elasticsearch","mariadb","mongodb","mysql","postgres","redis","proxysql"] | -| dashboard.folderID | ID of Grafana folder where these dashboards will be applied | 0 | -| dashboard.overwrite | If true, dashboard with matching uid will be overwritten | true | -| dashboard.templatize.title | If true, datasource will be prefixed to dashboard name | false | -| dashboard.templatize.datasource | If true, datasource will be hardcoded in the dashboard | false | -| dashboard.replacements.job=\"kube-state-metrics\" | | job=\"kubernetes-service-endpoints\" | -| dashboard.replacements.job=\"kubelet\" | | job=\"kubernetes-nodes-cadvisor\" | -| dashboard.replacements.job=\"repl-stats\" | | job=\"kubedb-databases\" | -| grafana.name | Name of Grafana Appbinding where these dashboards are applied | "" | -| grafana.namespace | Namespace of Grafana Appbinding where these dashboards are applied | "" | -| grafana.version | | 8.2.3 | -| grafana.jobName | | kubedb-databases | -| grafana.url | | "" | -| grafana.apikey | | "" | -| app.name | | "" | -| app.namespace | | "" | +| Parameter | Description | Default | +|---------------------------------------------------|--------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------| +| nameOverride | Overrides name template | "" | +| fullnameOverride | Overrides fullname template | "" | +| resources | List of resources for which dashboards will be applied | ["elasticsearch","kafka","mariadb","mongodb","mysql","perconaxtradb","postgres","proxysql","redis"] | +| dashboard.folderID | ID of Grafana folder where these dashboards will be applied | 0 | +| dashboard.overwrite | If true, dashboard with matching uid will be overwritten | true | +| dashboard.templatize.title | If true, datasource will be prefixed to dashboard name | false | +| dashboard.templatize.datasource | If true, datasource will be hardcoded in the dashboard | false | +| dashboard.replacements.job=\"kube-state-metrics\" | | job=\"kubernetes-service-endpoints\" | +| dashboard.replacements.job=\"kubelet\" | | job=\"kubernetes-nodes-cadvisor\" | +| dashboard.replacements.job=\"repl-stats\" | | job=\"kubedb-databases\" | +| grafana.name | Name of Grafana Appbinding where these dashboards are applied | "" | +| grafana.namespace | Namespace of Grafana Appbinding where these dashboards are applied | "" | +| grafana.version | | 8.2.3 | +| grafana.jobName | | kubedb-databases | +| grafana.url | | "" | +| grafana.apikey | | "" | +| app.name | | "" | +| app.namespace | | "" | Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example: ```bash -$ helm upgrade -i kubedb-grafana-dashboards appscode/kubedb-grafana-dashboards -n kubeops --create-namespace --version=v2023.12.11 --set resources=["elasticsearch","mariadb","mongodb","mysql","postgres","redis","proxysql"] +$ helm upgrade -i kubedb-grafana-dashboards appscode/kubedb-grafana-dashboards -n kubeops --create-namespace --version=v2023.12.11 --set resources=["elasticsearch","kafka","mariadb","mongodb","mysql","perconaxtradb","postgres","proxysql","redis"] ``` Alternatively, a YAML file that specifies the values for the parameters can be provided while diff --git a/charts/kubedb-grafana-dashboards/data/resources.yaml b/charts/kubedb-grafana-dashboards/data/resources.yaml index 8744ce702..20ff77cb7 100644 --- a/charts/kubedb-grafana-dashboards/data/resources.yaml +++ b/charts/kubedb-grafana-dashboards/data/resources.yaml @@ -13,12 +13,15 @@ mongodb: mysql: kind: MySQL resource: mysqls +perconaxtradb: + kind: PerconaXtraDB + resource: perconaxtradbs postgres: kind: Postgres resource: postgreses -redis: - kind: Redis - resource: redises proxysql: kind: ProxySQL resource: proxysqls +redis: + kind: Redis + resource: redises diff --git a/charts/kubedb-grafana-dashboards/values.yaml b/charts/kubedb-grafana-dashboards/values.yaml index 72991b7c3..dcccc8fb5 100644 --- a/charts/kubedb-grafana-dashboards/values.yaml +++ b/charts/kubedb-grafana-dashboards/values.yaml @@ -10,12 +10,14 @@ fullnameOverride: "" # List of resources for which dashboards will be applied resources: # +doc-gen:break - elasticsearch + - kafka - mariadb - mongodb - mysql + - perconaxtradb - postgres - - redis - proxysql + - redis dashboard: # ID of Grafana folder where these dashboards will be applied From cd733d47e5c588b473b3109ab4b75d1ee2d24cc4 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 10:51:48 -0800 Subject: [PATCH 15/19] fix tests Signed-off-by: Tamal Saha --- .../perconaxtradb/perconaxtradb-galera.json | 8 +- .../perconaxtradb/perconaxtradb-pod.json | 110 +++++++++--------- .../perconaxtradb/perconaxtradb-summary.json | 4 +- 3 files changed, 61 insertions(+), 61 deletions(-) diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json index e0a153c97..4502dde2d 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-galera.json @@ -81,7 +81,7 @@ "exemplar": true, "expr": "avg by(wsrep_cluster_name)(mysql_galera_variables_info{namespace=~\"$namespace\",service=~\"$app\"})", "interval": "", - "legendFormat": "{{wsrep_cluster_name}}", + "legendFormat": {{ `"{{wsrep_cluster_name}}"` }}, "refId": "A" } ], @@ -257,7 +257,7 @@ "exemplar": true, "expr": "avg_over_time(mysql_galera_evs_repl_latency_avg_seconds{namespace=~\"$namespace\",service=~\"$app\"}[5m])", "interval": "", - "legendFormat": "{{pod}} - Latency Average", + "legendFormat": {{ `"{{pod}} - Latency Average"` }}, "refId": "A" } ], @@ -357,7 +357,7 @@ "exemplar": true, "expr": "rate(mysql_galera_evs_repl_latency_stdev{namespace=~\"$namespace\",service=~\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}} - Latency Average", + "legendFormat": {{ `"{{pod}} - Latency Average"` }}, "refId": "A" } ], @@ -457,7 +457,7 @@ "exemplar": true, "expr": "rate(mysql_galera_evs_repl_latency_sample_size{namespace=~\"$namespace\",service=~\"$app\"}[1m])", "interval": "", - "legendFormat": "{{pod}} - Latency Average", + "legendFormat": {{ `"{{pod}} - Latency Average"` }}, "refId": "A" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json index 37b04cdc5..29fc177ac 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-pod.json @@ -729,7 +729,7 @@ "exemplar": true, "expr": "mysql_global_status_max_used_connections{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Max Used Connects - {{pod}}", + "legendFormat": {{ `"Max Used Connects - {{pod}}"` }}, "refId": "A" }, { @@ -737,7 +737,7 @@ "expr": "mysql_global_variables_max_connections{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Max Connects - {{pod}}", + "legendFormat": {{ `"Max Connects - {{pod}}"` }}, "refId": "B" } ], @@ -834,7 +834,7 @@ "exemplar": true, "expr": "mysql_global_status_aborted_connects{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Aborted Connects - {{pod}}", + "legendFormat": {{ `"Aborted Connects - {{pod}}"` }}, "refId": "A" }, { @@ -842,7 +842,7 @@ "expr": "mysql_global_status_aborted_clients{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Aborted Clients - {{pod}}", + "legendFormat": {{ `"Aborted Clients - {{pod}}"` }}, "refId": "B" } ], @@ -955,7 +955,7 @@ "exemplar": true, "expr": "mysql_global_status_threads_connected{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Threads Connected - {{pod}}", + "legendFormat": {{ `"Threads Connected - {{pod}}"` }}, "refId": "A" }, { @@ -963,7 +963,7 @@ "expr": "mysql_global_status_threads_running{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Threads Running - {{pod}}", + "legendFormat": {{ `"Threads Running - {{pod}}"` }}, "refId": "B" } ], @@ -1061,7 +1061,7 @@ "exemplar": true, "expr": "mysql_global_variables_thread_cache_size{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Thread Cache Size - {{pod}}", + "legendFormat": {{ `"Thread Cache Size - {{pod}}"` }}, "refId": "A" }, { @@ -1069,7 +1069,7 @@ "expr": "mysql_global_status_threads_cached{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Threads Cached - {{pod}} ", + "legendFormat": {{ `"Threads Cached - {{pod}}"` }}, "refId": "B" }, { @@ -1077,7 +1077,7 @@ "expr": "mysql_global_status_threads_created{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Threads Created - {{pod}}", + "legendFormat": {{ `"Threads Created - {{pod}}"` }}, "refId": "C" } ], @@ -1189,7 +1189,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_created_tmp_tables{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Created Tmp Tables - {{pod}}", + "legendFormat": {{ `"Created Tmp Tables - {{pod}}"` }}, "refId": "A" }, { @@ -1197,7 +1197,7 @@ "expr": "rate(mysql_global_status_created_tmp_disk_tables{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Created Tmp Disk Tables - {{pod}}", + "legendFormat": {{ `"Created Tmp Disk Tables - {{pod}}"` }}, "refId": "B" }, { @@ -1205,7 +1205,7 @@ "expr": "mysql_global_status_created_tmp_files{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Created Tmp Files - {{pod}}", + "legendFormat": {{ `"Created Tmp Files - {{pod}}"` }}, "refId": "C" } ], @@ -1303,7 +1303,7 @@ "exemplar": true, "expr": "mysql_global_status_slow_queries{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Slow Queries - {{pod}}", + "legendFormat": {{ `"Slow Queries - {{pod}}"` }}, "refId": "A" } ], @@ -1417,7 +1417,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_select_full_join{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Select Full Join - {{pod}}", + "legendFormat": {{ `"Select Full Join - {{pod}}"` }}, "refId": "A" }, { @@ -1425,7 +1425,7 @@ "expr": "rate(mysql_global_status_select_scan{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Select Scan - {{pod}}", + "legendFormat": {{ `"Select Scan - {{pod}}"` }}, "refId": "E" } ], @@ -1523,7 +1523,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_sort_rows{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Sort Rows - {{pod}}", + "legendFormat": {{ `"Sort Rows - {{pod}}"` }}, "refId": "A" }, { @@ -1531,7 +1531,7 @@ "expr": "rate(mysql_global_status_sort_range{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Sort Range - {{pod}}", + "legendFormat": {{ `"Sort Range - {{pod}}"` }}, "refId": "B" }, { @@ -1539,7 +1539,7 @@ "expr": "rate(mysql_global_status_sort_merge_passes{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Sort Merge Passes - {{pod}}", + "legendFormat": {{ `"Sort Merge Passes - {{pod}}"` }}, "refId": "C" }, { @@ -1547,7 +1547,7 @@ "expr": "rate(mysql_global_status_sort_scan{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Sort Scan - {{pod}}", + "legendFormat": {{ `"Sort Scan - {{pod}}"` }}, "refId": "D" } ], @@ -1658,7 +1658,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_table_locks_immediate{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Table Locks Immediate - {{pod}}", + "legendFormat": {{ `"Table Locks Immediate - {{pod}}"` }}, "refId": "A" }, { @@ -1666,7 +1666,7 @@ "expr": "rate(mysql_global_status_table_locks_waited{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Table Locks Waited - {{pod}}", + "legendFormat": {{ `"Table Locks Waited - {{pod}}"` }}, "refId": "B" } ], @@ -1763,7 +1763,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_questions{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Questions - {{pod}}", + "legendFormat": {{ `"Questions - {{pod}}"` }}, "refId": "A" } ], @@ -1891,7 +1891,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Inbound - {{pod}}", + "legendFormat": {{ `"Inbound - {{pod}}"` }}, "metric": "", "refId": "A", "step": 20 @@ -1905,7 +1905,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "Outbound - {{pod}}", + "legendFormat": {{ `"Outbound - {{pod}}"` }}, "metric": "", "refId": "B", "step": 20 @@ -2022,7 +2022,7 @@ "instant": false, "interval": "1h", "intervalFactor": 1, - "legendFormat": "Received - {{pod}}", + "legendFormat": {{ `"Received - {{pod}}"` }}, "metric": "", "refId": "A", "step": 20 @@ -2036,7 +2036,7 @@ "format": "time_series", "interval": "1h", "intervalFactor": 1, - "legendFormat": "Sent - {{pod}}", + "legendFormat": {{ `"Sent - {{pod}}"` }}, "metric": "", "refId": "B", "step": 20 @@ -2154,7 +2154,7 @@ "expr": "mysql_global_variables_innodb_buffer_pool_size{namespace=\"$namespace\",service=\"$app\",pod=\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "InnoDB Buffer Pool Size - {{pod}}", + "legendFormat": {{ `"InnoDB Buffer Pool Size - {{pod}}"` }}, "refId": "A" }, { @@ -2162,7 +2162,7 @@ "expr": "mysql_global_variables_innodb_log_buffer_size{namespace=\"$namespace\",service=\"$app\",pod=\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "InnoDB Log Buffer Size - {{pod}}", + "legendFormat": {{ `"InnoDB Log Buffer Size - {{pod}}"` }}, "refId": "B" }, { @@ -2170,7 +2170,7 @@ "expr": "mysql_global_status_innodb_mem_dictionary{namespace=\"$namespace\",service=\"$app\",pod=\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "InnoDB Dictionary Size - {{pod}}", + "legendFormat": {{ `"InnoDB Dictionary Size - {{pod}}"` }}, "refId": "D" }, { @@ -2178,7 +2178,7 @@ "expr": "mysql_global_variables_key_buffer_size{namespace=\"$namespace\",service=\"$app\",pod=\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Key Buffer Size - {{pod}}", + "legendFormat": {{ `"Key Buffer Size - {{pod}}"` }}, "refId": "E" }, { @@ -2186,7 +2186,7 @@ "expr": "mysql_global_variables_query_cache_size{namespace=\"$namespace\",service=\"$app\",pod=\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Query Cache Size - {{pod}}", + "legendFormat": {{ `"Query Cache Size - {{pod}}"` }}, "refId": "F" }, { @@ -2194,7 +2194,7 @@ "expr": "mysql_global_status_innodb_mem_adaptive_hash{namespace=\"$namespace\",service=\"$app\",pod=\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Adaptive Hash Index Size - {{pod}}", + "legendFormat": {{ `"Adaptive Hash Index Size - {{pod}}"` }}, "refId": "G" } ], @@ -2309,7 +2309,7 @@ "expr": "topk(5, rate(mysql_global_status_commands_total{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m]))", "instant": false, "interval": "", - "legendFormat": "Com_{{ command }} - {{pod}}", + "legendFormat": {{ `"Com_{{ command }} - {{pod}}"` }}, "refId": "A" } ], @@ -2425,7 +2425,7 @@ "instant": false, "interval": "1h", "intervalFactor": 1, - "legendFormat": "Com_{{ command }} - {{pod}}", + "legendFormat": {{ `"Com_{{ command }} - {{pod}}"` }}, "metric": "", "refId": "A", "step": 20 @@ -2529,7 +2529,7 @@ "expr": "rate(mysql_global_status_handlers_total{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])>0", "instant": false, "interval": "", - "legendFormat": "{{ handler }} - {{pod}}", + "legendFormat": {{ `"{{ handler }} - {{pod}}"` }}, "refId": "A" } ], @@ -2643,7 +2643,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_qcache_free_memory{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Query Cache Size - {{pod}}", + "legendFormat": {{ `"Query Cache Size - {{pod}}"` }}, "refId": "A" } ], @@ -2743,7 +2743,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_qcache_hits{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Hits - {{pod}}", + "legendFormat": {{ `"Hits - {{pod}}"` }}, "refId": "A" }, { @@ -2751,7 +2751,7 @@ "expr": "rate(mysql_global_status_qcache_inserts{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Inserts - {{pod}}", + "legendFormat": {{ `"Inserts - {{pod}}"` }}, "refId": "B" }, { @@ -2759,7 +2759,7 @@ "expr": "rate(mysql_global_status_qcache_not_cached{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Not Cached - {{pod}}", + "legendFormat": {{ `"Not Cached - {{pod}}"` }}, "refId": "C" }, { @@ -2767,7 +2767,7 @@ "expr": "rate(mysql_global_status_qcache_lowmem_prunes{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Prunes - {{pod}}", + "legendFormat": {{ `"Prunes - {{pod}}"` }}, "refId": "D" }, { @@ -2775,7 +2775,7 @@ "expr": "rate(mysql_global_status_qcache_queries_in_cache{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Queries in Cache - {{pod}}", + "legendFormat": {{ `"Queries in Cache - {{pod}}"` }}, "refId": "E" } ], @@ -2887,7 +2887,7 @@ "exemplar": true, "expr": "mysql_global_status_opened_files{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Openings - {{pod}}", + "legendFormat": {{ `"Openings - {{pod}}"` }}, "refId": "A" } ], @@ -2985,21 +2985,21 @@ "exemplar": true, "expr": "mysql_global_status_open_files{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Open Files - {{pod}}", + "legendFormat": {{ `"Open Files - {{pod}}"` }}, "refId": "A" }, { "exemplar": true, "expr": "mysql_global_variables_open_files_limit{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Open Files Limit - {{pod}}", + "legendFormat": {{ `"Open Files Limit - {{pod}}"` }}, "refId": "B" }, { "exemplar": true, "expr": "mysql_global_status_innodb_num_open_files{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "InnoDB Open Files - {{pod}}", + "legendFormat": {{ `"InnoDB Open Files - {{pod}}"` }}, "refId": "C" } ], @@ -3111,7 +3111,7 @@ "exemplar": true, "expr": "rate(mysql_global_status_opened_tables{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "interval": "", - "legendFormat": "Openings - {{pod}}", + "legendFormat": {{ `"Openings - {{pod}}"` }}, "refId": "A" }, { @@ -3119,7 +3119,7 @@ "expr": "rate(mysql_global_status_table_open_cache_hits{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Hits - {{pod}}", + "legendFormat": {{ `"Hits - {{pod}}"` }}, "refId": "B" }, { @@ -3127,7 +3127,7 @@ "expr": "rate(mysql_global_status_table_open_cache_misses{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Misses - {{pod}}", + "legendFormat": {{ `"Misses - {{pod}}"` }}, "refId": "C" }, { @@ -3135,7 +3135,7 @@ "expr": "rate(mysql_global_status_table_open_cache_overflows{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Misses due to Overflows - {{pod}}", + "legendFormat": {{ `"Misses due to Overflows - {{pod}}"` }}, "refId": "D" }, { @@ -3143,7 +3143,7 @@ "expr": "rate(mysql_global_status_table_open_cache_hits{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}[5m])", "hide": false, "interval": "", - "legendFormat": "Table Open Cache Hit Ratio - {{pod}}", + "legendFormat": {{ `"Table Open Cache Hit Ratio - {{pod}}"` }}, "refId": "E" } ], @@ -3241,14 +3241,14 @@ "exemplar": true, "expr": "mysql_global_status_open_tables{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Open Tables - {{pod}}", + "legendFormat": {{ `"Open Tables - {{pod}}"` }}, "refId": "A" }, { "exemplar": true, "expr": "mysql_global_variables_table_open_cache{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Table Open Cache - {{pod}}", + "legendFormat": {{ `"Table Open Cache - {{pod}}"` }}, "refId": "B" } ], @@ -3346,14 +3346,14 @@ "exemplar": true, "expr": "mysql_global_status_open_table_definitions{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Open Table Definitions - {{pod}}", + "legendFormat": {{ `"Open Table Definitions - {{pod}}"` }}, "refId": "A" }, { "exemplar": true, "expr": "mysql_global_variables_table_definition_cache{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "interval": "", - "legendFormat": "Table Definitions Cache Size - {{pod}}", + "legendFormat": {{ `"Table Definitions Cache Size - {{pod}}"` }}, "refId": "B" }, { @@ -3361,7 +3361,7 @@ "expr": "mysql_global_status_opened_table_definitions{namespace=~\"$namespace\",service=~\"$app\",pod=~\"$pod\"}", "hide": false, "interval": "", - "legendFormat": "Opened Table Definitions - {{pod}}", + "legendFormat": {{ `"Opened Table Definitions - {{pod}}"` }}, "refId": "C" } ], diff --git a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json index 403ae876f..5f777211b 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json +++ b/charts/kubedb-grafana-dashboards/dashboards/perconaxtradb/perconaxtradb-summary.json @@ -1804,7 +1804,7 @@ "instant": false, "interval": "", "intervalFactor": 1, - "legendFormat": "{{pod}}-disk-write", + "legendFormat": {{ `"{{pod}}-disk-write"` }}, "refId": "A" }, { @@ -1813,7 +1813,7 @@ "hide": false, "instant": false, "interval": "", - "legendFormat": "{{pod}}-disk-read", + "legendFormat": {{ `"{{pod}}-disk-read"` }}, "refId": "B" } ], From 4a7327b2c2d06f9cee1a39b14879d07868a280db Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 10:57:22 -0800 Subject: [PATCH 16/19] test grafana dashboards Signed-off-by: Tamal Saha --- .github/workflows/ci.yml | 82 ++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d1f7cbd3..35f01e914 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -113,47 +113,6 @@ jobs: kubectl apply -f crds/kubedb-crds.yaml metrics-configuration-checker --content=./charts/kubedb-metrics/templates/ - - name: Test Monitoring - run: | - export LICENSE_FILE=/tmp/license.txt - helm repo add prometheus-community https://prometheus-community.github.io/helm-charts - helm repo update - helm upgrade -i kube-prometheus-stack prometheus-community/kube-prometheus-stack --wait \ - --namespace monitoring --create-namespace \ - --set grafana.defaultDashboardsEnabled=false - kubectl apply -f crds/kubedb-catalog-crds.yaml - helm upgrade -i kubedb charts/kubedb --wait \ - --namespace kubedb --create-namespace \ - --set kubedb-provisioner.enabled=true \ - --set kubedb-ops-manager.enabled=true \ - --set kubedb-autoscaler.enabled=true \ - --set kubedb-dashboard.enabled=true \ - --set kubedb-schema-manager.enabled=true \ - --set-file global.license=$LICENSE_FILE \ - --set global.monitoring.agent=prometheus.io/operator \ - --set global.monitoring.serviceMonitor.labels.release=kube-prometheus-stack - helm delete kubedb --namespace kubedb - kubectl apply -f crds/kubedb-catalog-crds.yaml - helm upgrade -i kubedb charts/kubedb --wait \ - --namespace kubedb --create-namespace \ - --set kubedb-provisioner.enabled=true \ - --set kubedb-ops-manager.enabled=true \ - --set kubedb-autoscaler.enabled=true \ - --set kubedb-dashboard.enabled=true \ - --set kubedb-schema-manager.enabled=true \ - --set-file global.license=$LICENSE_FILE \ - --set global.monitoring.agent=prometheus.io/builtin - helm delete kubedb --namespace kubedb - helm upgrade -i kubedb-opscenter charts/kubedb-opscenter --wait \ - --namespace kubedb --create-namespace \ - --set global.monitoring.agent=prometheus.io/operator \ - --set global.monitoring.serviceMonitor.labels.release=kube-prometheus-stack - helm delete kubedb-opscenter --namespace kubedb - helm upgrade -i kubedb-opscenter charts/kubedb-opscenter --wait \ - --namespace kubedb --create-namespace \ - --set global.monitoring.agent=prometheus.io/builtin - helm delete kubedb-opscenter --namespace kubedb - - name: Test Grafana Dashboards run: | echo "all db dashboards" @@ -212,3 +171,44 @@ jobs: --set resources[0]=redis \ --set app.name=mydb \ --set app.namespace=demo + + - name: Test Monitoring + run: | + export LICENSE_FILE=/tmp/license.txt + helm repo add prometheus-community https://prometheus-community.github.io/helm-charts + helm repo update + helm upgrade -i kube-prometheus-stack prometheus-community/kube-prometheus-stack --wait \ + --namespace monitoring --create-namespace \ + --set grafana.defaultDashboardsEnabled=false + kubectl apply -f crds/kubedb-catalog-crds.yaml + helm upgrade -i kubedb charts/kubedb --wait \ + --namespace kubedb --create-namespace \ + --set kubedb-provisioner.enabled=true \ + --set kubedb-ops-manager.enabled=true \ + --set kubedb-autoscaler.enabled=true \ + --set kubedb-dashboard.enabled=true \ + --set kubedb-schema-manager.enabled=true \ + --set-file global.license=$LICENSE_FILE \ + --set global.monitoring.agent=prometheus.io/operator \ + --set global.monitoring.serviceMonitor.labels.release=kube-prometheus-stack + helm delete kubedb --namespace kubedb + kubectl apply -f crds/kubedb-catalog-crds.yaml + helm upgrade -i kubedb charts/kubedb --wait \ + --namespace kubedb --create-namespace \ + --set kubedb-provisioner.enabled=true \ + --set kubedb-ops-manager.enabled=true \ + --set kubedb-autoscaler.enabled=true \ + --set kubedb-dashboard.enabled=true \ + --set kubedb-schema-manager.enabled=true \ + --set-file global.license=$LICENSE_FILE \ + --set global.monitoring.agent=prometheus.io/builtin + helm delete kubedb --namespace kubedb + helm upgrade -i kubedb-opscenter charts/kubedb-opscenter --wait \ + --namespace kubedb --create-namespace \ + --set global.monitoring.agent=prometheus.io/operator \ + --set global.monitoring.serviceMonitor.labels.release=kube-prometheus-stack + helm delete kubedb-opscenter --namespace kubedb + helm upgrade -i kubedb-opscenter charts/kubedb-opscenter --wait \ + --namespace kubedb --create-namespace \ + --set global.monitoring.agent=prometheus.io/builtin + helm delete kubedb-opscenter --namespace kubedb From e47adaae048e482e4d6f4d449612b61538d2bdfe Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 11:09:26 -0800 Subject: [PATCH 17/19] Add tests Signed-off-by: Tamal Saha --- .github/workflows/ci.yml | 118 +++++++++++++++++++-------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35f01e914..c08224c5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,65 @@ jobs: ./hack/scripts/update-chart-dependencies.sh make ci + - name: Test Grafana Dashboards + run: | + echo "all db dashboards" + helm template charts/kubedb-grafana-dashboards + echo "-----------------------------------------" + echo "elasticsearch dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=elasticsearch \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "kafka dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=kafka \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "mariadb dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=mariadb \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "mongodb dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=mongodb \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "mysql dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=mysql \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "perconaxtradb dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=perconaxtradb \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "postgres dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=postgres \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "proxysql dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=proxysql \ + --set app.name=mydb \ + --set app.namespace=demo + echo "-----------------------------------------" + echo "redis dashboard with alerts" + helm template charts/kubedb-grafana-dashboards \ + --set resources[0]=redis \ + --set app.name=mydb \ + --set app.namespace=demo + kubernetes: name: Kubernetes runs-on: ubuntu-20.04 @@ -113,65 +172,6 @@ jobs: kubectl apply -f crds/kubedb-crds.yaml metrics-configuration-checker --content=./charts/kubedb-metrics/templates/ - - name: Test Grafana Dashboards - run: | - echo "all db dashboards" - helm template charts/kubedb-grafana-dashboards - echo "-----------------------------------------" - echo "elasticsearch dashboard with alerts" - helm template charts/kubedb-grafana-dashboards \ - --set resources[0]=elasticsearch \ - --set app.name=mydb \ - --set app.namespace=demo - echo "-----------------------------------------" - echo "kafka dashboard with alerts" - helm template charts/kubedb-grafana-dashboards \ - --set resources[0]=kafka \ - --set app.name=mydb \ - --set app.namespace=demo - echo "-----------------------------------------" - echo "mariadb dashboard with alerts" - helm template charts/kubedb-grafana-dashboards \ - --set resources[0]=mariadb \ - --set app.name=mydb \ - --set app.namespace=demo - echo "-----------------------------------------" - echo "mongodb dashboard with alerts" - helm template charts/kubedb-grafana-dashboards \ - --set resources[0]=mongodb \ - --set app.name=mydb \ - --set app.namespace=demo - echo "-----------------------------------------" - echo "mysql dashboard with alerts" - helm template charts/kubedb-grafana-dashboards \ - --set resources[0]=mysql \ - --set app.name=mydb \ - --set app.namespace=demo - echo "-----------------------------------------" - echo "perconaxtradb dashboard with alerts" - helm template charts/kubedb-grafana-dashboards \ - --set resources[0]=perconaxtradb \ - --set app.name=mydb \ - --set app.namespace=demo - echo "-----------------------------------------" - echo "postgres dashboard with alerts" - helm template charts/kubedb-grafana-dashboards \ - --set resources[0]=postgres \ - --set app.name=mydb \ - --set app.namespace=demo - echo "-----------------------------------------" - echo "proxysql dashboard with alerts" - helm template charts/kubedb-grafana-dashboards \ - --set resources[0]=proxysql \ - --set app.name=mydb \ - --set app.namespace=demo - echo "-----------------------------------------" - echo "redis dashboard with alerts" - helm template charts/kubedb-grafana-dashboards \ - --set resources[0]=redis \ - --set app.name=mydb \ - --set app.namespace=demo - - name: Test Monitoring run: | export LICENSE_FILE=/tmp/license.txt From 84a798a9d586a884cd2ef93e50447c30734aec89 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 11:24:12 -0800 Subject: [PATCH 18/19] Remove replacement templates Signed-off-by: Tamal Saha --- charts/kubedb-grafana-dashboards/README.md | 38 +++++++++---------- .../ci/ci-values.yaml | 5 +++ charts/kubedb-grafana-dashboards/values.yaml | 8 ++-- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/charts/kubedb-grafana-dashboards/README.md b/charts/kubedb-grafana-dashboards/README.md index 8a75f84a1..d1c0b001c 100644 --- a/charts/kubedb-grafana-dashboards/README.md +++ b/charts/kubedb-grafana-dashboards/README.md @@ -45,26 +45,24 @@ The command removes all the Kubernetes components associated with the chart and The following table lists the configurable parameters of the `kubedb-grafana-dashboards` chart and their default values. -| Parameter | Description | Default | -|---------------------------------------------------|--------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------| -| nameOverride | Overrides name template | "" | -| fullnameOverride | Overrides fullname template | "" | -| resources | List of resources for which dashboards will be applied | ["elasticsearch","kafka","mariadb","mongodb","mysql","perconaxtradb","postgres","proxysql","redis"] | -| dashboard.folderID | ID of Grafana folder where these dashboards will be applied | 0 | -| dashboard.overwrite | If true, dashboard with matching uid will be overwritten | true | -| dashboard.templatize.title | If true, datasource will be prefixed to dashboard name | false | -| dashboard.templatize.datasource | If true, datasource will be hardcoded in the dashboard | false | -| dashboard.replacements.job=\"kube-state-metrics\" | | job=\"kubernetes-service-endpoints\" | -| dashboard.replacements.job=\"kubelet\" | | job=\"kubernetes-nodes-cadvisor\" | -| dashboard.replacements.job=\"repl-stats\" | | job=\"kubedb-databases\" | -| grafana.name | Name of Grafana Appbinding where these dashboards are applied | "" | -| grafana.namespace | Namespace of Grafana Appbinding where these dashboards are applied | "" | -| grafana.version | | 8.2.3 | -| grafana.jobName | | kubedb-databases | -| grafana.url | | "" | -| grafana.apikey | | "" | -| app.name | | "" | -| app.namespace | | "" | +| Parameter | Description | Default | +|---------------------------------|--------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------| +| nameOverride | Overrides name template | "" | +| fullnameOverride | Overrides fullname template | "" | +| resources | List of resources for which dashboards will be applied | ["elasticsearch","kafka","mariadb","mongodb","mysql","perconaxtradb","postgres","proxysql","redis"] | +| dashboard.folderID | ID of Grafana folder where these dashboards will be applied | 0 | +| dashboard.overwrite | If true, dashboard with matching uid will be overwritten | true | +| dashboard.templatize.title | If true, datasource will be prefixed to dashboard name | false | +| dashboard.templatize.datasource | If true, datasource will be hardcoded in the dashboard | false | +| dashboard.replacements | | {} | +| grafana.name | Name of Grafana Appbinding where these dashboards are applied | "" | +| grafana.namespace | Namespace of Grafana Appbinding where these dashboards are applied | "" | +| grafana.version | | 8.2.3 | +| grafana.jobName | | kubedb-databases | +| grafana.url | | "" | +| grafana.apikey | | "" | +| app.name | | "" | +| app.namespace | | "" | Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example: diff --git a/charts/kubedb-grafana-dashboards/ci/ci-values.yaml b/charts/kubedb-grafana-dashboards/ci/ci-values.yaml index 54ca53d09..4fd52bc3d 100644 --- a/charts/kubedb-grafana-dashboards/ci/ci-values.yaml +++ b/charts/kubedb-grafana-dashboards/ci/ci-values.yaml @@ -1,2 +1,7 @@ grafana: name: "grafana-appbinding" +dashboard: + replacements: + job=\"kube-state-metrics\": job=\"kubernetes-service-endpoints\" + job=\"kubelet\": job=\"kubernetes-nodes-cadvisor\" + job=\"repl-stats\": job=\"kubedb-databases\" diff --git a/charts/kubedb-grafana-dashboards/values.yaml b/charts/kubedb-grafana-dashboards/values.yaml index dcccc8fb5..c576af122 100644 --- a/charts/kubedb-grafana-dashboards/values.yaml +++ b/charts/kubedb-grafana-dashboards/values.yaml @@ -29,10 +29,10 @@ dashboard: title: false # If true, datasource will be hardcoded in the dashboard datasource: false - replacements: - job=\"kube-state-metrics\": job=\"kubernetes-service-endpoints\" - job=\"kubelet\": job=\"kubernetes-nodes-cadvisor\" - job=\"repl-stats\": job=\"kubedb-databases\" + replacements: {} + # job=\"kube-state-metrics\": job=\"kubernetes-service-endpoints\" + # job=\"kubelet\": job=\"kubernetes-nodes-cadvisor\" + # job=\"repl-stats\": job=\"kubedb-databases\" grafana: # Name of Grafana Appbinding where these dashboards are applied From 6df0e6a4f15e31dad6d627a37d6ecaa12c263c9f Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 14 Dec 2023 11:25:06 -0800 Subject: [PATCH 19/19] Add flag to disable alerts panels Signed-off-by: Tamal Saha --- charts/kubedb-grafana-dashboards/README.md | 1 + charts/kubedb-grafana-dashboards/values.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/charts/kubedb-grafana-dashboards/README.md b/charts/kubedb-grafana-dashboards/README.md index d1c0b001c..7e4d7f1fe 100644 --- a/charts/kubedb-grafana-dashboards/README.md +++ b/charts/kubedb-grafana-dashboards/README.md @@ -54,6 +54,7 @@ The following table lists the configurable parameters of the `kubedb-grafana-das | dashboard.overwrite | If true, dashboard with matching uid will be overwritten | true | | dashboard.templatize.title | If true, datasource will be prefixed to dashboard name | false | | dashboard.templatize.datasource | If true, datasource will be hardcoded in the dashboard | false | +| dashboard.alerts | | false | | dashboard.replacements | | {} | | grafana.name | Name of Grafana Appbinding where these dashboards are applied | "" | | grafana.namespace | Namespace of Grafana Appbinding where these dashboards are applied | "" | diff --git a/charts/kubedb-grafana-dashboards/values.yaml b/charts/kubedb-grafana-dashboards/values.yaml index c576af122..bc6329806 100644 --- a/charts/kubedb-grafana-dashboards/values.yaml +++ b/charts/kubedb-grafana-dashboards/values.yaml @@ -29,6 +29,7 @@ dashboard: title: false # If true, datasource will be hardcoded in the dashboard datasource: false + alerts: false replacements: {} # job=\"kube-state-metrics\": job=\"kubernetes-service-endpoints\" # job=\"kubelet\": job=\"kubernetes-nodes-cadvisor\"