only saving recent

This commit is contained in:
David Newhall II 2021-03-21 21:37:10 -07:00
parent 5cb23de212
commit a9e925d759
1 changed files with 4 additions and 0 deletions

View File

@ -191,6 +191,10 @@ func descUAP(ns string) *uap { // nolint: funlen
}
func (u *promUnifi) exportRogueAP(r report, d *unifi.RogueAP) {
if d.Age.Val == 0 {
return // only keep things that are recent.
}
labels := []string{d.Security, d.Oui, d.Band, d.ApMac, d.SiteName, d.Essid, d.SourceName}
r.send([]*metric{