From 0411e59eed6a20d7b17634108b6b5de7254c0d89 Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 12 May 2023 18:59:38 +0200 Subject: [PATCH] Fixes Memory for the Map --- staticDevices.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/staticDevices.go b/staticDevices.go index e77a350..d8f97f7 100644 --- a/staticDevices.go +++ b/staticDevices.go @@ -20,7 +20,9 @@ func processGateways() []node { //Calulate Memory (%) mem := getInfluxDataPoint("mem", currentDevice.FQDN, conf.General.ProxmoxInfluxPort) maxmem := getInfluxDataPoint("maxmem", currentDevice.FQDN, conf.General.ProxmoxInfluxPort) - memory := mem / maxmem * 100 + memoryMap := mem / maxmem + memory := memoryMap * 100 + // Get Network rx := getInfluxDataPoint("netin", currentDevice.FQDN, conf.General.ProxmoxInfluxPort) tx := getInfluxDataPoint("netout", currentDevice.FQDN, conf.General.ProxmoxInfluxPort) // Get CPU (%) @@ -68,7 +70,7 @@ func processGateways() []node { ClientsOther: 0, RootFSUsage: 0, LoadAVG: cpu, - MemoryUsage: memory, + MemoryUsage: memoryMap, Uptime: up.Format(iso8601), GatewayNexthop: "", Gateway: "",