From 9d7045e4830d5c177d79a1cdee6012e855bcefaa Mon Sep 17 00:00:00 2001 From: beorn7 Date: Wed, 10 Jul 2019 19:40:04 +0200 Subject: [PATCH] (Re-)adjust to Grafana gauge expecting percentage 0-100 (rather than 1-0) Signed-off-by: beorn7 --- docs/node-mixin/dashboards/node.libsonnet | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/node-mixin/dashboards/node.libsonnet b/docs/node-mixin/dashboards/node.libsonnet index 80e2fa92..dd82b306 100644 --- a/docs/node-mixin/dashboards/node.libsonnet +++ b/docs/node-mixin/dashboards/node.libsonnet @@ -63,6 +63,7 @@ local gauge = promgrafonnet.gauge; node_memory_MemAvailable{%(nodeExporterSelector)s, instance="$instance"} / node_memory_MemTotal{%(nodeExporterSelector)s, instance="$instance"} + * 100 ||| % $._config, ).withLowerBeingBetter(); @@ -95,11 +96,11 @@ local gauge = promgrafonnet.gauge; local diskSpaceUsage = gauge.new( 'Disk Space Usage', ||| - 1 - ( + 100 - ( sum(node_filesystem_free{%(nodeExporterSelector)s, device!="rootfs", instance="$instance"} / sum(node_filesystem_size{%(nodeExporterSelector)s, device!="rootfs", instance="$instance"} - ) + ) * 100 ||| % $._config, ).withLowerBeingBetter();