diff --git a/unifipoller/unifipoller.go b/unifipoller/unifipoller.go index ff1fe0f1..1f3960e5 100644 --- a/unifipoller/unifipoller.go +++ b/unifipoller/unifipoller.go @@ -128,6 +128,7 @@ func (u *UnifiPoller) GetUnifi() (err error) { } u.Unifi.ErrorLog = u.LogErrorf // Log all errors. u.Unifi.DebugLog = u.LogDebugf // Log debug messages. + // this may fail? but we'll try one more time with u.CheckSites below. v, err := u.GetServer() if err != nil { v.ServerVersion = "unknown" diff --git a/unifipoller/worker.go b/unifipoller/worker.go index 572f4e8b..8192d4d7 100644 --- a/unifipoller/worker.go +++ b/unifipoller/worker.go @@ -32,7 +32,8 @@ FIRST: continue FIRST } } - return errors.Errorf("configured site not found on controller: %v", s) + // This is fine, it may get added later. + u.LogErrorf("configured site not found on controller: %v", s) } return nil } @@ -154,7 +155,7 @@ func (m *Metrics) processPoints(asset Asset) error { // GetFilteredSites returns a list of sites to fetch data for. // Omits requested but unconfigured sites. Grabs the full list from the -// controller and filters the sites provided in the config file. +// controller and returns the sites provided in the config file. func (u *UnifiPoller) GetFilteredSites() (unifi.Sites, error) { sites, err := u.GetSites() if err != nil {