Fixes Memory for the Map
This commit is contained in:
parent
ae6d96a0ff
commit
0411e59eed
@ -20,7 +20,9 @@ func processGateways() []node {
|
|||||||
//Calulate Memory (%)
|
//Calulate Memory (%)
|
||||||
mem := getInfluxDataPoint("mem", currentDevice.FQDN, conf.General.ProxmoxInfluxPort)
|
mem := getInfluxDataPoint("mem", currentDevice.FQDN, conf.General.ProxmoxInfluxPort)
|
||||||
maxmem := getInfluxDataPoint("maxmem", 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)
|
rx := getInfluxDataPoint("netin", currentDevice.FQDN, conf.General.ProxmoxInfluxPort)
|
||||||
tx := getInfluxDataPoint("netout", currentDevice.FQDN, conf.General.ProxmoxInfluxPort)
|
tx := getInfluxDataPoint("netout", currentDevice.FQDN, conf.General.ProxmoxInfluxPort)
|
||||||
// Get CPU (%)
|
// Get CPU (%)
|
||||||
@ -68,7 +70,7 @@ func processGateways() []node {
|
|||||||
ClientsOther: 0,
|
ClientsOther: 0,
|
||||||
RootFSUsage: 0,
|
RootFSUsage: 0,
|
||||||
LoadAVG: cpu,
|
LoadAVG: cpu,
|
||||||
MemoryUsage: memory,
|
MemoryUsage: memoryMap,
|
||||||
Uptime: up.Format(iso8601),
|
Uptime: up.Format(iso8601),
|
||||||
GatewayNexthop: "",
|
GatewayNexthop: "",
|
||||||
Gateway: "",
|
Gateway: "",
|
||||||
|
Loading…
Reference in New Issue
Block a user