Skip to content

Commit dac6d03

Browse files
authored
Merge pull request #979 from BradErz/chore-fix-kubestatemetrics-selector
fix(dashboards/resources/node): kube_node_status_capacity missing kubeStateMetricsSelector
2 parents abe5031 + 37f3b20 commit dac6d03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dashboards/resources/node.libsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ local var = g.dashboard.variable;
8181
+ tsPanel.queryOptions.withTargets([
8282
prometheus.new(
8383
'${datasource}',
84-
'sum(kube_node_status_capacity{%(clusterLabel)s="$cluster", node=~"$node", resource="cpu"})' % $._config,
84+
'sum(kube_node_status_capacity{%(clusterLabel)s="$cluster", %(kubeStateMetricsSelector)s, node=~"$node", resource="cpu"})' % $._config,
8585
)
8686
+ prometheus.withLegendFormat('max capacity'),
8787

@@ -180,7 +180,7 @@ local var = g.dashboard.variable;
180180
+ tsPanel.queryOptions.withTargets([
181181
prometheus.new(
182182
'${datasource}',
183-
'sum(kube_node_status_capacity{%(clusterLabel)s="$cluster", node=~"$node", resource="memory"})' % $._config,
183+
'sum(kube_node_status_capacity{%(clusterLabel)s="$cluster", %(kubeStateMetricsSelector)s, node=~"$node", resource="memory"})' % $._config,
184184
)
185185
+ prometheus.withLegendFormat('max capacity'),
186186

0 commit comments

Comments
 (0)