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: "",