Fixed CPU on Map
This commit is contained in:
parent
0411e59eed
commit
c9b496d5eb
@ -26,7 +26,8 @@ func processGateways() []node {
|
|||||||
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 (%)
|
||||||
cpu := getInfluxDataPoint("cpu", currentDevice.FQDN, conf.General.ProxmoxInfluxPort) * 100
|
cpuMap := getInfluxDataPoint("cpu", currentDevice.FQDN, conf.General.ProxmoxInfluxPort)
|
||||||
|
cpu := cpuMap * 100
|
||||||
//Uptime (seconds)
|
//Uptime (seconds)
|
||||||
uptime := getInfluxDataPoint("uptime", currentDevice.FQDN, conf.General.ProxmoxInfluxPort)
|
uptime := getInfluxDataPoint("uptime", currentDevice.FQDN, conf.General.ProxmoxInfluxPort)
|
||||||
t := time.Duration(uptime * float64(time.Second))
|
t := time.Duration(uptime * float64(time.Second))
|
||||||
@ -69,7 +70,7 @@ func processGateways() []node {
|
|||||||
ClientsWifi5: 0,
|
ClientsWifi5: 0,
|
||||||
ClientsOther: 0,
|
ClientsOther: 0,
|
||||||
RootFSUsage: 0,
|
RootFSUsage: 0,
|
||||||
LoadAVG: cpu,
|
LoadAVG: cpuMap,
|
||||||
MemoryUsage: memoryMap,
|
MemoryUsage: memoryMap,
|
||||||
Uptime: up.Format(iso8601),
|
Uptime: up.Format(iso8601),
|
||||||
GatewayNexthop: "",
|
GatewayNexthop: "",
|
||||||
|
Loading…
Reference in New Issue
Block a user