fix gateway counter

This commit is contained in:
David Newhall II 2021-03-25 00:53:28 -07:00
parent 06f0d25e65
commit 79a07a56b8
2 changed files with 9 additions and 9 deletions

View File

@ -103,10 +103,10 @@ func (r *Report) String() string {
m, c := r.Metrics, r.Counts.Val
return fmt.Sprintf("Site: %d, Client: %d, "+
"%s: %d, %s/%s/: %d, %s: %d, %s/%s/%s/%s: %d/%d/%d/%d, "+
"Gateways: %d, %s: %d, %s: %d, %s/%s/%s/%s: %d/%d/%d/%d, "+
"DPI Site/Client: %d/%d, %s: %d, %s: %d, Err: %d, Dur: %v",
len(m.Sites), len(m.Clients),
uapT, c[uapT], udmT, usgT, c[udmT]+c[usgT]+c[uxgT], uswT, c[uswT],
c[udmT]+c[usgT]+c[uxgT], uapT, c[uapT], uswT, c[uswT],
idsT, eventT, alarmT, anomalyT, c[idsT], c[eventT], c[alarmT], c[anomalyT],
len(m.SitesDPI), len(m.ClientsDPI), pointT, c[pointT], fieldT, c[fieldT],
len(r.Errors), r.Elapsed.Round(time.Millisecond))

View File

@ -16,16 +16,16 @@ func (u *InfluxUnifi) batchRogueAP(r report, s *unifi.RogueAP) {
r.send(&metric{
Table: "uap_rogue",
Tags: map[string]string{
"ap_mac": s.ApMac,
"site_name": s.SiteName,
"source": s.SourceName,
"name": s.Essid,
"mac": s.Bssid,
"security": s.Security,
"radio": s.Radio,
"radio_name": s.RadioName,
"oui": s.Oui,
"band": s.Band,
"mac": s.Bssid,
"ap_mac": s.ApMac,
"radio": s.Radio,
"radio_name": s.RadioName,
"site_name": s.SiteName,
"name": s.Essid,
"source": s.SourceName,
},
Fields: map[string]interface{}{
"age": s.Age.Val,