mirror of
https://github.com/unpoller/unpoller.git
synced 2026-03-31 06:24:21 -04:00
Fixes #425 When polling multiple controllers, if one controller was down or unreachable, unpoller would stop collecting data from ALL controllers. This caused complete data loss across all sites when just one was down. Root Cause: Both Metrics() and Events() methods would immediately return an error when any controller failed, skipping all remaining controllers in the loop. Changes: - Log errors from failed controllers but continue to next controller - Track collection errors separately from successful data collection - Only return error if ALL controllers failed and no data was collected - Return success if at least one controller provided data This allows unpoller to continue monitoring healthy controllers even when some are temporarily unreachable due to network issues, timeouts, or maintenance. Example behavior: - Controller 1: Down (timeout) - logs error, continues - Controller 2: Up - collects data successfully - Controller 3: Up - collects data successfully - Result: Returns data from controllers 2 and 3 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>