@@ -175,7 +175,7 @@ local var = g.dashboard.variable;
175175          },
176176        ]),
177177
178-         tsPanel.new('Memory Usage (w/o  cache)' )
178+         tsPanel.new('Memory Usage (w/cache)' )
179179        + tsPanel.standardOptions.withUnit('bytes' )
180180        + tsPanel.queryOptions.withTargets([
181181          prometheus.new(
@@ -202,6 +202,33 @@ local var = g.dashboard.variable;
202202          + fieldOverride.byName.withProperty('custom.lineStyle' , { fill:  'dash' , dash:  [10 , 10 ] }),
203203        ]),
204204
205+         tsPanel.new('Memory Usage (w/o cache)' )
206+         + tsPanel.standardOptions.withUnit('bytes' )
207+         + tsPanel.queryOptions.withTargets([
208+           prometheus.new(
209+             '${datasource}' ,
210+             'sum(kube_node_status_capacity{%(clusterLabel)s="$cluster", %(kubeStateMetricsSelector)s, node=~"$node", resource="memory"})'  % $._config,
211+           )
212+           + prometheus.withLegendFormat('max capacity' ),
213+ 
214+           prometheus.new(
215+             '${datasource}' ,
216+             'sum(node_namespace_pod_container:container_memory_rss{%(clusterLabel)s="$cluster", node=~"$node", container!=""}) by (pod)'  % $._config,
217+           )
218+           + prometheus.withLegendFormat('{{pod}}' ),
219+         ])
220+         + tsPanel.fieldConfig.defaults.custom.withStacking({ mode:  'normal'  })
221+         + tsPanel.standardOptions.withOverrides([
222+           fieldOverride.byName.new('max capacity' )
223+           + fieldOverride.byName.withPropertiesFromOptions(
224+             timeSeries.standardOptions.color.withMode('fixed' )
225+             + timeSeries.standardOptions.color.withFixedColor('red' )
226+           )
227+           + fieldOverride.byName.withProperty('custom.stacking' , { mode:  'none'  })
228+           + fieldOverride.byName.withProperty('custom.hideFrom' , { tooltip:  true , viz:  false , legend:  false  })
229+           + fieldOverride.byName.withProperty('custom.lineStyle' , { fill:  'dash' , dash:  [10 , 10 ] }),
230+         ]),
231+ 
205232        table.new('Memory Quota' )
206233        + table.standardOptions.withUnit('bytes' )
207234        + table.queryOptions.withTargets([
0 commit comments