Compare commits

..

No commits in common. "0411e59eed6a20d7b17634108b6b5de7254c0d89" and "064161584d01263759e436115830d1e61d700d9a" have entirely different histories.

View File

@ -16,17 +16,14 @@ func processGateways() []node {
log.Println("Processing Static Device: ", d.Devices[i].Name)
currentDevice := d.Devices[i]
//Collect data
//Calulate Memory (%)
//Calulate Memory
mem := getInfluxDataPoint("mem", currentDevice.FQDN, conf.General.ProxmoxInfluxPort)
maxmem := getInfluxDataPoint("maxmem", currentDevice.FQDN, conf.General.ProxmoxInfluxPort)
memoryMap := mem / maxmem
memory := memoryMap * 100
// Get Network
memory := mem / maxmem * 100
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
// Get CPU
cpu := getInfluxDataPoint("cpu", currentDevice.FQDN, conf.General.ProxmoxInfluxPort)
//Uptime (seconds)
uptime := getInfluxDataPoint("uptime", currentDevice.FQDN, conf.General.ProxmoxInfluxPort)
t := time.Duration(uptime * float64(time.Second))
@ -57,7 +54,6 @@ func processGateways() []node {
log.Fatalln("Error: ", err)
}
sendInfluxBatchDataPoint(point, conf.General.FreifunkInfluxPort)
//Build Nodes
nodes = append(nodes, node{
Firstseen: up.Format(iso8601),
@ -70,7 +66,7 @@ func processGateways() []node {
ClientsOther: 0,
RootFSUsage: 0,
LoadAVG: cpu,
MemoryUsage: memoryMap,
MemoryUsage: memory,
Uptime: up.Format(iso8601),
GatewayNexthop: "",
Gateway: "",