Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion dashboards/resources/node.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ local var = g.dashboard.variable;
},
]),

tsPanel.new('Memory Usage (w/o cache)')
tsPanel.new('Memory Usage (w/cache)')
+ tsPanel.standardOptions.withUnit('bytes')
+ tsPanel.queryOptions.withTargets([
prometheus.new(
Expand All @@ -202,6 +202,33 @@ local var = g.dashboard.variable;
+ fieldOverride.byName.withProperty('custom.lineStyle', { fill: 'dash', dash: [10, 10] }),
]),

tsPanel.new('Memory Usage (w/o cache)')
+ tsPanel.standardOptions.withUnit('bytes')
+ tsPanel.queryOptions.withTargets([
prometheus.new(
'${datasource}',
'sum(kube_node_status_capacity{%(clusterLabel)s="$cluster", %(kubeStateMetricsSelector)s, node=~"$node", resource="memory"})' % $._config,
)
+ prometheus.withLegendFormat('max capacity'),

prometheus.new(
'${datasource}',
'sum(node_namespace_pod_container:container_memory_rss{%(clusterLabel)s="$cluster", node=~"$node", container!=""}) by (pod)' % $._config,
)
+ prometheus.withLegendFormat('{{pod}}'),
])
+ tsPanel.fieldConfig.defaults.custom.withStacking({ mode: 'normal' })
+ tsPanel.standardOptions.withOverrides([
fieldOverride.byName.new('max capacity')
+ fieldOverride.byName.withPropertiesFromOptions(
timeSeries.standardOptions.color.withMode('fixed')
+ timeSeries.standardOptions.color.withFixedColor('red')
)
+ fieldOverride.byName.withProperty('custom.stacking', { mode: 'none' })
+ fieldOverride.byName.withProperty('custom.hideFrom', { tooltip: true, viz: false, legend: false })
+ fieldOverride.byName.withProperty('custom.lineStyle', { fill: 'dash', dash: [10, 10] }),
]),

table.new('Memory Quota')
+ table.standardOptions.withUnit('bytes')
+ table.queryOptions.withTargets([
Expand Down
Loading