Fixes Memory for the Map
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Stefan Hoffmann 2023-05-12 18:59:38 +02:00
parent ae6d96a0ff
commit 0411e59eed
Signed by: stefan
GPG Key ID: 8EFC7042BF8D5CDD

View File

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