This commit is contained in:
davidnewhall2 2019-12-10 00:56:38 -08:00
parent a512418a18
commit 1dec643836
1 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package promunifi
import (
"fmt"
"log"
"reflect"
"strings"
"sync"
@ -112,6 +113,7 @@ func (u *promUnifi) Collect(ch chan<- prometheus.Metric) {
defer r.close()
if r.Metrics, err = r.cf.CollectFn(); err != nil {
log.Println("Error", err)
r.error(ch, prometheus.NewInvalidDesc(fmt.Errorf("metric fetch failed")), err)
return
}