Skip to content

Commit

Permalink
Merge pull request #979 from BradErz/chore-fix-kubestatemetrics-selector
Browse files Browse the repository at this point in the history
fix(dashboards/resources/node): kube_node_status_capacity missing kubeStateMetricsSelector
  • Loading branch information
povilasv authored Oct 4, 2024
2 parents abe5031 + 37f3b20 commit dac6d03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dashboards/resources/node.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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'),

Expand Down Expand Up @@ -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'),

Expand Down

0 comments on commit dac6d03

Please sign in to comment.