(Re-)adjust to Grafana gauge expecting percentage 0-100 (rather than 1-0)

Signed-off-by: beorn7 <beorn@grafana.com>
This commit is contained in:
beorn7 2019-07-10 19:40:04 +02:00
parent f331b308f3
commit 9d7045e483

View file

@ -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();