This commit is contained in:
davidnewhall2 2019-12-10 00:30:27 -08:00
parent 1f2cafad8d
commit 39b25739be
1 changed files with 6 additions and 0 deletions

View File

@ -1,6 +1,8 @@
package promunifi
import (
"log"
"github.com/prometheus/client_golang/prometheus"
"golift.io/unifi"
)
@ -175,6 +177,10 @@ func (u *promUnifi) exportUAP(r report, d *unifi.UAP) {
// udm doesn't have these stats exposed yet, so pass 2 or 6 metrics.
func (u *promUnifi) exportUAPstats(r report, labels []string, ap *unifi.Ap, bytes ...unifi.FlexInt) {
if ap == nil {
log.Println("ap was nil?!", labels[2])
return
}
labelU := []string{"user", labels[1], labels[2]}
labelG := []string{"guest", labels[1], labels[2]}
r.send([]*metric{