Files
ServerKit/backend
Juan DenisandClaude Opus 5 1fbdddecd2 feat(connect): send ServerKit Cloud one metrics summary a minute
The panel already samples the host every 60 s into MetricsHistory for its own
charts. connect_metrics.MetricsPublisher turns the newest of those rows into
the summary Cloud expects, adds the counts Cloud alerts on (containers,
unhealthy apps, certificates near expiry, backup age) and hands it to the
relay socket on a `metrics` stream.

- services/connect_metrics.py  build, buffer (five minutes, then drop rather
  than send late), and apply the interval Cloud asks for
- services/connect_client.py   publish on the interval from the WS loop and
  read the stream close for Cloud's answer

Nothing new is collected: a minute the panel did not record is a minute Cloud
does not hear about. Every count source is optional — a panel without Docker,
domains or a backup policy sends null for those fields instead of failing the
whole summary.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018q56AfqpgKjio4n9KYubvZ
2026-09-02 11:26:30 -04:00
..