Skip to content

investigate: perform_fleet_health_check stops refreshing data for most agents (#669 root cause) #675

Closed

Description

@dolho

Summary

Split from #669 (which patched the 500 symptom). The underlying cause of the stale 24h rollups remains unfixed: in production, services/monitoring_service.py:perform_fleet_health_check was last refreshing 8 of 9 agents months ago (last refresh 2026-02-23 to 2026-04-28), while only one agent (competitor-analyzer) was getting fresh data on the expected interval.

#669 closes the user-visible 500 by coercing NULL status rows to "unknown" and wrapping the aggregator in try/except. That degrades gracefully — but agents still show stale data because the scheduled fleet check is not actually running for most of them.

Hypothesis space

  1. Silent exception in the per-agent loop kills the rest of the fleet. perform_fleet_health_check may iterate without per-agent isolation, so one agent's failure short-circuits the whole pass.
  2. Monitoring service is_running flag flipped off without restart visibility. Check /api/monitoring/config history.
  3. Scheduler interval drift / coroutine cancellation that nobody noticed.
  4. Agents created after a certain date never got registered with the monitoring loop (registration only at startup vs. on-create).

Asks

  • Pull production scheduler / monitoring-service logs around the stalest refresh timestamps (2026-02-23, 2026-03-04, 2026-03-19, 2026-04-28).
  • Confirm whether perform_fleet_health_check wraps each agent in its own try/except — if not, add isolation.
  • Add structured log line per fleet-check pass with agent count + per-agent outcome so this is observable next time.
  • Audit registration path: does adding/restarting an agent re-register it with the monitoring service?

Related

Activity

  1. added
    status-in-progress
    on May 15, 2026
  2. self-assigned this
    on May 15, 2026
  3. added
    status-in-dev
    and removed
    status-in-progress
    on May 28, 2026
  4. vybe commented on Jun 1, 2026

    @vybe
    Contributor

    Shipped in v0.6.0 (released via #998).

  5. added
    complexity-medium
    theme-reliability
    and removed
    status-in-dev
    on Jun 1, 2026
  6. added a commit that references this issue on Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-mediumpriority-p2theme-reliabilitytype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions