mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
(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:
parent
f331b308f3
commit
9d7045e483
|
@ -63,6 +63,7 @@ local gauge = promgrafonnet.gauge;
|
||||||
node_memory_MemAvailable{%(nodeExporterSelector)s, instance="$instance"}
|
node_memory_MemAvailable{%(nodeExporterSelector)s, instance="$instance"}
|
||||||
/
|
/
|
||||||
node_memory_MemTotal{%(nodeExporterSelector)s, instance="$instance"}
|
node_memory_MemTotal{%(nodeExporterSelector)s, instance="$instance"}
|
||||||
|
* 100
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
).withLowerBeingBetter();
|
).withLowerBeingBetter();
|
||||||
|
|
||||||
|
@ -95,11 +96,11 @@ local gauge = promgrafonnet.gauge;
|
||||||
local diskSpaceUsage = gauge.new(
|
local diskSpaceUsage = gauge.new(
|
||||||
'Disk Space Usage',
|
'Disk Space Usage',
|
||||||
|||
|
|||
|
||||||
1 - (
|
100 - (
|
||||||
sum(node_filesystem_free{%(nodeExporterSelector)s, device!="rootfs", instance="$instance"}
|
sum(node_filesystem_free{%(nodeExporterSelector)s, device!="rootfs", instance="$instance"}
|
||||||
/
|
/
|
||||||
sum(node_filesystem_size{%(nodeExporterSelector)s, device!="rootfs", instance="$instance"}
|
sum(node_filesystem_size{%(nodeExporterSelector)s, device!="rootfs", instance="$instance"}
|
||||||
)
|
) * 100
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
).withLowerBeingBetter();
|
).withLowerBeingBetter();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue