Browse Source

Fix memory gauge in mixin with multiple pods

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
pull/1855/head
Arthur Outhenin-Chalandre 4 years ago committed by Johannes 'fish' Ziemke
parent
commit
6585e43eec
  1. 5
      docs/node-mixin/dashboards/node.libsonnet

5
docs/node-mixin/dashboards/node.libsonnet

@ -75,14 +75,15 @@ local gauge = promgrafonnet.gauge;
// TODO: It would be nicer to have a gauge that gets a 0-1 range and displays it as a percentage 0%-100%. // TODO: It would be nicer to have a gauge that gets a 0-1 range and displays it as a percentage 0%-100%.
// This needs to be added upstream in the promgrafonnet library and then changed here. // This needs to be added upstream in the promgrafonnet library and then changed here.
// NOTE: avg() is used to circumvent a label change caused by a node_exporter rollout.
local memoryGauge = gauge.new( local memoryGauge = gauge.new(
'Memory Usage', 'Memory Usage',
||| |||
100 - 100 -
( (
node_memory_MemAvailable_bytes{%(nodeExporterSelector)s, instance="$instance"} avg(node_memory_MemAvailable_bytes{%(nodeExporterSelector)s, instance="$instance"})
/ /
node_memory_MemTotal_bytes{%(nodeExporterSelector)s, instance="$instance"} avg(node_memory_MemTotal_bytes{%(nodeExporterSelector)s, instance="$instance"})
* 100 * 100
) )
||| % $._config, ||| % $._config,

Loading…
Cancel
Save