Skip to content

Commit

Permalink
k8s-stack: fixed dashboards (#1576)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk authored Oct 10, 2024
1 parent c46b1e7 commit 6ee600b
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/victoria-metrics-k8s-stack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Next release

- TODO
- Fixed dashboards variable queries

## 0.27.1

Expand Down
2 changes: 1 addition & 1 deletion charts/victoria-metrics-k8s-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: victoria-metrics-k8s-stack
description: Kubernetes monitoring on VictoriaMetrics stack. Includes VictoriaMetrics Operator, Grafana dashboards, ServiceScrapes and VMRules
type: application
version: 0.27.1
version: 0.27.2
appVersion: v1.104.0
sources:
- https://github.com/VictoriaMetrics/helm-charts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ templating:
includeAll: true
label: instance
name: instance
query: label_values(up{cluster="$cluster", job="kube-controller-manager"}, instance)
query: label_values(up{ {{ $.Values.global.clusterLabel }}=~"$cluster", job="kube-controller-manager"}, instance)
refresh: 2
sort: 1
type: query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ templating:
includeAll: true
label: instance
name: instance
query: label_values(up{job="kubelet", metrics_path="/metrics",cluster="$cluster"}, instance)
query: label_values(up{job="kubelet", metrics_path="/metrics", {{ $.Values.global.clusterLabel }}=~"$cluster"}, instance)
refresh: 2
type: query
time:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ templating:
includeAll: true
label: instance
name: instance
query: label_values(up{job="kube-proxy", cluster="$cluster", job="kube-proxy"}, instance)
query: label_values(up{job="kube-proxy", {{ $.Values.global.clusterLabel }}=~"$cluster", job="kube-proxy"}, instance)
refresh: 2
type: query
time:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ templating:
includeAll: true
label: instance
name: instance
query: label_values(up{job="kube-scheduler", cluster="$cluster"}, instance)
query: label_values(up{job="kube-scheduler", {{ $.Values.global.clusterLabel }}=~"$cluster"}, instance)
refresh: 2
type: query
time:
Expand Down
2 changes: 2 additions & 0 deletions charts/victoria-metrics-k8s-stack/hack/sync_dashboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ def patch_dashboard(dashboard, name):
variable["query"]["query"] = fix_query(
variable["query"]["query"]
)
elif isinstance(variable["query"], str):
variable["query"] = fix_query(variable["query"])
if variable.get("type", "") == "datasource":
variable["query"] = (
'[[ default "prometheus" .Values.grafana.defaultDatasourceType ]]'
Expand Down

0 comments on commit 6ee600b

Please sign in to comment.