mirror of
https://github.com/unpoller/unpoller.git
synced 2026-04-05 08:54:09 -04:00
* fix(influxunifi): use CelsiusSafe() for temp fields to fix InfluxDB type conflict Write temp_* fields as float64 instead of int64 so InfluxDB does not report 'field type conflict' when the measurement already has float. Requires github.com/unpoller/unifi/v5 with CelsiusSafe() (unpoller/unifi#195). Fixes #944. Co-authored-by: Cursor <cursoragent@cursor.com> * deps: unifi v5.17.0; nil guards and 429 retry (unpoller#943) - Bump github.com/unpoller/unifi/v5 to v5.17.0 (CelsiusSafe, ErrNilUnifi, RateLimitError) - inputunifi: guard pollController for nil c.Unifi; controllerID(c) in formatSites/Clients/Devices - inputunifi: getUnifi retry with backoff on 429 (up to 5 attempts, Retry-After or exponential backoff) Co-authored-by: Cursor <cursoragent@cursor.com> * test(influxunifi): expect temp_* as float after CelsiusSafe() (fix #944) Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -100,6 +100,10 @@ func (u *InputUnifi) pollController(c *Controller) (*poller.Metrics, error) {
|
||||
u.RLock()
|
||||
defer u.RUnlock()
|
||||
|
||||
if c.Unifi == nil {
|
||||
return nil, fmt.Errorf("controller client is nil (e.g. after 429 or auth failure): %s", c.URL)
|
||||
}
|
||||
|
||||
u.LogDebugf("Polling controller: %s (%s)", c.URL, c.ID)
|
||||
|
||||
// Get the sites we care about.
|
||||
|
||||
Reference in New Issue
Block a user