From fbcbb6a6350cbae56d42cd95be53d6e08932d96d Mon Sep 17 00:00:00 2001 From: Stephen Shirley Date: Wed, 18 Feb 2015 11:26:29 +0100 Subject: [PATCH] Fix available memory calculation. Also account for buffers, making the value match the output of free(1) --- consoles/node.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consoles/node.html b/consoles/node.html index fb3fbb6da..f47ef67d5 100644 --- a/consoles/node.html +++ b/consoles/node.html @@ -22,7 +22,7 @@ {{ reReplaceAll "(.*?://)([^:/]+?)(:\\d+)?/.*" "$2" .Labels.instance }} Yes{{ else }} class="alert-danger">No{{ end }} {{ template "prom_query_drilldown" (args (printf "100 * (1 - avg by(instance)(rate(node_cpu{job='node',mode='idle',instance='%s'}[5m])))" .Labels.instance) "%" "printf.3g") }} - {{ template "prom_query_drilldown" (args (printf "node_memory_MemTotal{job='node',instance='%s'} - node_memory_MemFree{job='node',instance='%s'} - node_memory_Cached{job='node',instance='%s'}" .Labels.instance .Labels.instance .Labels.instance) "B" "humanize1024") }} + {{ template "prom_query_drilldown" (args (printf "node_memory_MemFree{job='node',instance='%s'} + node_memory_Cached{job='node',instance='%s'} + node_memory_Buffers{job='node',instance='%s'}" .Labels.instance .Labels.instance .Labels.instance) "B" "humanize1024") }} {{ else }} No nodes found.