fixes
This commit is contained in:
parent
a57f2b335d
commit
d50d3d85e9
|
|
@ -123,12 +123,11 @@ func fillDPIMapTotals(m totalsDPImap, name, controller, site string, dpi unifi.D
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
oldDPI := m[controller][site][name]
|
dpi.TxPackets += m[controller][site][name].TxPackets
|
||||||
oldDPI.TxPackets += dpi.TxPackets
|
dpi.RxPackets += m[controller][site][name].RxPackets
|
||||||
oldDPI.RxPackets += dpi.RxPackets
|
dpi.TxBytes += m[controller][site][name].TxBytes
|
||||||
oldDPI.TxBytes += dpi.TxBytes
|
dpi.RxBytes += m[controller][site][name].RxBytes
|
||||||
oldDPI.RxBytes += dpi.RxBytes
|
m[controller][site][name] = dpi
|
||||||
m[controller][site][name] = oldDPI
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func reportClientDPItotals(r report, appTotal, catTotal totalsDPImap) {
|
func reportClientDPItotals(r report, appTotal, catTotal totalsDPImap) {
|
||||||
|
|
@ -139,10 +138,13 @@ func reportClientDPItotals(r report, appTotal, catTotal totalsDPImap) {
|
||||||
|
|
||||||
// This can allow us to aggregate other data types later, like `name` or `mac`, or anything else unifi adds.
|
// This can allow us to aggregate other data types later, like `name` or `mac`, or anything else unifi adds.
|
||||||
a := all{
|
a := all{
|
||||||
|
/*
|
||||||
|
// This produces 7000+ metrics per site. Disabled for now.
|
||||||
{
|
{
|
||||||
kind: "application",
|
kind: "application",
|
||||||
val: appTotal,
|
val: appTotal,
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
{
|
{
|
||||||
kind: "category",
|
kind: "category",
|
||||||
val: catTotal,
|
val: catTotal,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue