mirror of
https://github.com/unpoller/unpoller.git
synced 2026-04-05 08:54:00 -04:00
bump unifi client and address
https://github.com/unpoller/dashboards/issues/20\#issuecomment-1364716049 and the duplicate https://github.com/unpoller/unpoller/issues/492
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package influxunifi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
)
|
||||
|
||||
@@ -86,8 +84,8 @@ func (u *InfluxUnifi) batchClientDPI(r report, v any, appTotal, catTotal totalsD
|
||||
}
|
||||
|
||||
for _, dpi := range s.ByApp {
|
||||
category := unifi.DPICats.Get(int(dpi.Cat.Val))
|
||||
application := unifi.DPIApps.GetApp(int(dpi.Cat.Val), int(dpi.App.Val))
|
||||
category := unifi.DPICats.Get(dpi.Cat.Int())
|
||||
application := unifi.DPIApps.GetApp(dpi.Cat.Int(), dpi.App.Int())
|
||||
fillDPIMapTotals(appTotal, application, s.SourceName, s.SiteName, dpi)
|
||||
fillDPIMapTotals(catTotal, category, s.SourceName, s.SiteName, dpi)
|
||||
|
||||
@@ -123,14 +121,10 @@ func fillDPIMapTotals(m totalsDPImap, name, controller, site string, dpi unifi.D
|
||||
}
|
||||
|
||||
existing := m[controller][site][name]
|
||||
existing.TxPackets.Val += dpi.TxPackets.Val
|
||||
existing.TxPackets.Txt = fmt.Sprintf("%f", existing.TxPackets.Val)
|
||||
existing.RxPackets.Val += dpi.RxPackets.Val
|
||||
existing.RxPackets.Txt = fmt.Sprintf("%f", existing.RxPackets.Val)
|
||||
existing.TxBytes.Val += dpi.TxBytes.Val
|
||||
existing.TxBytes.Txt = fmt.Sprintf("%f", existing.TxBytes.Val)
|
||||
existing.RxBytes.Val += dpi.RxBytes.Val
|
||||
existing.RxBytes.Txt = fmt.Sprintf("%f", existing.RxBytes.Val)
|
||||
existing.TxPackets.Add(&dpi.TxPackets)
|
||||
existing.RxPackets.Add(&dpi.RxPackets)
|
||||
existing.TxBytes.Add(&dpi.TxBytes)
|
||||
existing.RxBytes.Add(&dpi.RxBytes)
|
||||
m[controller][site][name] = existing
|
||||
}
|
||||
|
||||
|
||||
@@ -68,8 +68,8 @@ func (u *InfluxUnifi) batchSiteDPI(r report, v any) {
|
||||
r.send(&metric{
|
||||
Table: "sitedpi",
|
||||
Tags: map[string]string{
|
||||
"category": unifi.DPICats.Get(int(dpi.Cat.Val)),
|
||||
"application": unifi.DPIApps.GetApp(int(dpi.Cat.Val), int(dpi.App.Val)),
|
||||
"category": unifi.DPICats.Get(dpi.Cat.Int()),
|
||||
"application": unifi.DPIApps.GetApp(dpi.Cat.Int(), dpi.App.Int()),
|
||||
"site_name": s.SiteName,
|
||||
"source": s.SourceName,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user