From 57cbed5148913e1be173d1b3d0199330840ff0c3 Mon Sep 17 00:00:00 2001 From: Bradley Wilson-Hunt Date: Thu, 26 Sep 2024 18:02:41 +0100 Subject: [PATCH] fix(dashboards/resources/node): kube_node_status_capacity missing kubeStateMetricsSelector --- dashboards/resources/node.libsonnet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboards/resources/node.libsonnet b/dashboards/resources/node.libsonnet index 806cb2bde..78ec0ea45 100644 --- a/dashboards/resources/node.libsonnet +++ b/dashboards/resources/node.libsonnet @@ -81,7 +81,7 @@ local var = g.dashboard.variable; + tsPanel.queryOptions.withTargets([ prometheus.new( '${datasource}', - 'sum(kube_node_status_capacity{%(clusterLabel)s="$cluster", node=~"$node", resource="cpu"})' % $._config, + 'sum(kube_node_status_capacity{%(clusterLabel)s="$cluster",%(kubeStateMetricsSelector)s, node=~"$node", resource="cpu"})' % $._config, ) + prometheus.withLegendFormat('max capacity'), @@ -180,7 +180,7 @@ local var = g.dashboard.variable; + tsPanel.queryOptions.withTargets([ prometheus.new( '${datasource}', - 'sum(kube_node_status_capacity{%(clusterLabel)s="$cluster", node=~"$node", resource="memory"})' % $._config, + 'sum(kube_node_status_capacity{%(clusterLabel)s="$cluster",%(kubeStateMetricsSelector)s, node=~"$node", resource="memory"})' % $._config, ) + prometheus.withLegendFormat('max capacity'),