aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBenoît Knecht <benoit.knecht@fsfe.org>2019-10-24 18:13:36 +0200
committerBenoît Knecht <benoit.knecht@fsfe.org>2019-10-28 15:12:42 +0100
commit5a7b85876d6108a91f0d8673c0d7eca38687671b (patch)
tree4b6eaee42e5ce145c9b842e1afdb47a79de867fe /docs
parent74a90e81c03a81761c5fae1731d0a004edab82d1 (diff)
downloadprometheus_node_collector-5a7b85876d6108a91f0d8673c0d7eca38687671b.tar.bz2
prometheus_node_collector-5a7b85876d6108a91f0d8673c0d7eca38687671b.tar.xz
prometheus_node_collector-5a7b85876d6108a91f0d8673c0d7eca38687671b.zip
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>
Diffstat (limited to 'docs')
-rw-r--r--docs/node-mixin/dashboards/use.libsonnet8
-rw-r--r--docs/node-mixin/rules/rules.libsonnet8
2 files changed, 6 insertions, 10 deletions
diff --git a/docs/node-mixin/dashboards/use.libsonnet b/docs/node-mixin/dashboards/use.libsonnet
index 8463ab9..d2a568f 100644
--- a/docs/node-mixin/dashboards/use.libsonnet
+++ b/docs/node-mixin/dashboards/use.libsonnet
@@ -53,8 +53,8 @@ local g = import 'grafana-builder/grafana.libsonnet';
53 { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) }, 53 { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) },
54 ) 54 )
55 .addPanel( 55 .addPanel(
56 g.panel('Memory Saturation (Swapped Pages)') + 56 g.panel('Memory Saturation (Major Page Faults)') +
57 g.queryPanel('instance:node_memory_swap_io_pages:rate1m{%(nodeExporterSelector)s}' % $._config, '{{instance}}', legendLink) + 57 g.queryPanel('instance:node_vmstat_pgmajfault:rate1m{%(nodeExporterSelector)s}' % $._config, '{{instance}}', legendLink) +
58 g.stack + 58 g.stack +
59 { yaxes: g.yaxes('rps') }, 59 { yaxes: g.yaxes('rps') },
60 ) 60 )
@@ -201,8 +201,8 @@ local g = import 'grafana-builder/grafana.libsonnet';
201 { yaxes: g.yaxes('percentunit') }, 201 { yaxes: g.yaxes('percentunit') },
202 ) 202 )
203 .addPanel( 203 .addPanel(
204 g.panel('Memory Saturation (pages swapped per second)') + 204 g.panel('Memory Saturation (Major Page Faults)') +
205 g.queryPanel('instance:node_memory_swap_io_pages:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config, 'Swap IO') + 205 g.queryPanel('instance:node_vmstat_pgmajfault:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config, 'Major page faults') +
206 { 206 {
207 yaxes: g.yaxes('short'), 207 yaxes: g.yaxes('short'),
208 legend+: { show: false }, 208 legend+: { show: false },
diff --git a/docs/node-mixin/rules/rules.libsonnet b/docs/node-mixin/rules/rules.libsonnet
index 85f7618..6b396e3 100644
--- a/docs/node-mixin/rules/rules.libsonnet
+++ b/docs/node-mixin/rules/rules.libsonnet
@@ -50,13 +50,9 @@
50 ||| % $._config, 50 ||| % $._config,
51 }, 51 },
52 { 52 {
53 record: 'instance:node_memory_swap_io_pages:rate1m', 53 record: 'instance:node_vmstat_pgmajfault:rate1m',
54 expr: ||| 54 expr: |||
55 ( 55 rate(node_vmstat_pgmajfault{%(nodeExporterSelector)s}[1m])
56 rate(node_vmstat_pgpgin{%(nodeExporterSelector)s}[1m])
57 +
58 rate(node_vmstat_pgpgout{%(nodeExporterSelector)s}[1m])
59 )
60 ||| % $._config, 56 ||| % $._config,
61 }, 57 },
62 { 58 {