From c9b496d5eb3b3982f1c1260b18a6494617a8ee39 Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 12 May 2023 19:07:16 +0200 Subject: [PATCH] Fixed CPU on Map --- staticDevices.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/staticDevices.go b/staticDevices.go index d8f97f7..e5bd2da 100644 --- a/staticDevices.go +++ b/staticDevices.go @@ -26,7 +26,8 @@ func processGateways() []node { rx := getInfluxDataPoint("netin", currentDevice.FQDN, conf.General.ProxmoxInfluxPort) tx := getInfluxDataPoint("netout", currentDevice.FQDN, conf.General.ProxmoxInfluxPort) // Get CPU (%) - cpu := getInfluxDataPoint("cpu", currentDevice.FQDN, conf.General.ProxmoxInfluxPort) * 100 + cpuMap := getInfluxDataPoint("cpu", currentDevice.FQDN, conf.General.ProxmoxInfluxPort) + cpu := cpuMap * 100 //Uptime (seconds) uptime := getInfluxDataPoint("uptime", currentDevice.FQDN, conf.General.ProxmoxInfluxPort) t := time.Duration(uptime * float64(time.Second)) @@ -69,7 +70,7 @@ func processGateways() []node { ClientsWifi5: 0, ClientsOther: 0, RootFSUsage: 0, - LoadAVG: cpu, + LoadAVG: cpuMap, MemoryUsage: memoryMap, Uptime: up.Format(iso8601), GatewayNexthop: "",