Browse Source

docs/node-mixin: Improve memory pressure rule

The `instance:node_memory_swap_io_pages:rate1m` rule was intended to
measure the amount of memory pressure a system is under, but its name is
a bit misleading (it specifically refers to swap), and the rate of
`node_vmstat_pgmajfault` is a better metric for memory pressure
(see #1524).

This commit renames `instance:node_memory_swap_io_pages:rate1m` to
`instance:node_vmstat_pgmajfault:rate1m`, and defines it as
`rate(node_vmstat_pgmajfault{%(nodeExporterSelector)s}[1m])`. The
dashboards are updated accordingly.

Signed-off-by: Benoît Knecht <benoit.knecht@fsfe.org>
pull/1524/head
Benoît Knecht 5 years ago
parent
commit
5a7b85876d
  1. 8
      docs/node-mixin/dashboards/use.libsonnet
  2. 8
      docs/node-mixin/rules/rules.libsonnet

8
docs/node-mixin/dashboards/use.libsonnet

@ -53,8 +53,8 @@ local g = import 'grafana-builder/grafana.libsonnet';
{ yaxes: g.yaxes({ format: 'percentunit', max: 1 }) }, { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) },
) )
.addPanel( .addPanel(
g.panel('Memory Saturation (Swapped Pages)') + g.panel('Memory Saturation (Major Page Faults)') +
g.queryPanel('instance:node_memory_swap_io_pages:rate1m{%(nodeExporterSelector)s}' % $._config, '{{instance}}', legendLink) + g.queryPanel('instance:node_vmstat_pgmajfault:rate1m{%(nodeExporterSelector)s}' % $._config, '{{instance}}', legendLink) +
g.stack + g.stack +
{ yaxes: g.yaxes('rps') }, { yaxes: g.yaxes('rps') },
) )
@ -201,8 +201,8 @@ local g = import 'grafana-builder/grafana.libsonnet';
{ yaxes: g.yaxes('percentunit') }, { yaxes: g.yaxes('percentunit') },
) )
.addPanel( .addPanel(
g.panel('Memory Saturation (pages swapped per second)') + g.panel('Memory Saturation (Major Page Faults)') +
g.queryPanel('instance:node_memory_swap_io_pages:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config, 'Swap IO') + g.queryPanel('instance:node_vmstat_pgmajfault:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config, 'Major page faults') +
{ {
yaxes: g.yaxes('short'), yaxes: g.yaxes('short'),
legend+: { show: false }, legend+: { show: false },

8
docs/node-mixin/rules/rules.libsonnet

@ -50,13 +50,9 @@
||| % $._config, ||| % $._config,
}, },
{ {
record: 'instance:node_memory_swap_io_pages:rate1m', record: 'instance:node_vmstat_pgmajfault:rate1m',
expr: ||| expr: |||
( rate(node_vmstat_pgmajfault{%(nodeExporterSelector)s}[1m])
rate(node_vmstat_pgpgin{%(nodeExporterSelector)s}[1m])
+
rate(node_vmstat_pgpgout{%(nodeExporterSelector)s}[1m])
)
||| % $._config, ||| % $._config,
}, },
{ {

Loading…
Cancel
Save