change up counter
This commit is contained in:
parent
b0de385215
commit
097c61aec9
|
|
@ -70,15 +70,16 @@ func (c *Config) PollUnifiController(controller *unifi.Unifi, infdb influx.Clien
|
||||||
logErrors([]error{err}, "infdb.Write(bp)")
|
logErrors([]error{err}, "infdb.Write(bp)")
|
||||||
}
|
}
|
||||||
// Talk about the data.
|
// Talk about the data.
|
||||||
var fieldcount int
|
var fieldcount, pointcount int
|
||||||
for _, p := range bp.Points() {
|
for _, p := range bp.Points() {
|
||||||
|
pointcount++
|
||||||
i, _ := p.Fields()
|
i, _ := p.Fields()
|
||||||
fieldcount += len(i)
|
fieldcount += len(i)
|
||||||
}
|
}
|
||||||
c.Logf("Unifi Measurements Recorded. Sites: %d Clients: %d, "+
|
c.Logf("Unifi Measurements Recorded. Sites: %d Clients: %d, "+
|
||||||
"Wireless APs: %d, Gateways: %d, Switches: %d, Points: %d, Fields: %d",
|
"Wireless APs: %d, Gateways: %d, Switches: %d, Points: %d, Fields: %d",
|
||||||
len(sites), len(clients.UCLs),
|
len(sites), len(clients.UCLs),
|
||||||
len(devices.UAPs), len(devices.USGs), len(devices.USWs), len(bp.Points()), fieldcount)
|
len(devices.UAPs), len(devices.USGs), len(devices.USWs), pointcount, fieldcount)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue