Skip to content

fix(collect): stop false fleet-wide offline alerts - #162

Open
gsanchietti wants to merge 5 commits into
mainfrom
fix_link_failed
Open

fix(collect): stop false fleet-wide offline alerts#162
gsanchietti wants to merge 5 commits into
mainfrom
fix_link_failed

Conversation

@gsanchietti

@gsanchietti gsanchietti commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

A gap in our own heartbeat recording used to make the whole fleet look
offline at once, sending a critical alert to every customer for a fault on
our side. Collect now recognises that pattern and stays quiet, while
systems that genuinely went offline still alert as before.

Also fixes two long-standing blanks in alert data: the "all clear" email
and the saved alert history were both losing their description text.

How to test

Stop heartbeating from a test system and confirm a single LinkFailed alert
arrives after the timeout, that the recovery email is no longer empty, and
that the saved history row has a summary.

@gsanchietti gsanchietti self-assigned this Jul 29, 2026
@edospadoni
edospadoni deployed to fix_link_failed - my-collect-qa PR #162 July 29, 2026 08:00 — with Render Active
@github-actions

Copy link
Copy Markdown
Contributor

🔗 Redirect URIs Added to Logto

The following redirect URIs have been automatically added to the Logto application configuration:

Redirect URIs:

  • https://my-proxy-qa-pr-162.onrender.com/login-redirect

Post-logout redirect URIs:

  • https://my-proxy-qa-pr-162.onrender.com/login

These will be automatically removed when the PR is closed or merged.

@gsanchietti
gsanchietti marked this pull request as ready for review July 29, 2026 08:07
@gsanchietti
gsanchietti requested a review from edospadoni July 29, 2026 08:07
@edospadoni
edospadoni deployed to fix_link_failed - my-collect-qa PR #162 July 29, 2026 08:12 — with Render Active
@gsanchietti
gsanchietti marked this pull request as draft July 29, 2026 08:12
Systems send heartbeats in synchronized waves, so when collect stops
recording them every affected system looks offline at the same instant
and each raises a critical LinkFailed alert to its customer. A single
gap can therefore page the whole fleet for a fault on our side.

Machines that are really dead stop beating at arbitrary moments, so a
tight cluster of identical last_heartbeat values is our own fault, not
theirs. Detect that cluster and skip those alerts, while systems that
went quiet on their own still alert normally.

Assisted-by: Claude Code:claude-opus-5
Systems beat roughly every 10 minutes, so the old 20 minute timeout
tolerated only two missed beats. Two lost beats in a row was enough to
mark the entire fleet offline at once. 30 minutes allows three, so one
missed beat plus a late one no longer trips it.

Docs still claimed 10 minutes, which has been wrong for a while.

Assisted-by: Claude Code:claude-opus-5
Alertmanager merges an incoming alert over the one it clears, keeping
only the original start time. Our resolve carried no text, so it blanked
the description on every recovery — the "all clear" email and the alert
history entry both ended up empty.

Give the resolve its own text. Labels are untouched, so it still matches
and clears the right alert.

Assisted-by: Claude Code:claude-opus-5
Alert history read a "summary" field that nothing ever writes: every
alert source uses the per-language summary_en and summary_it instead. The
column was empty for every row ever saved. Fall back to those.

Assisted-by: Claude Code:claude-opus-5
A heartbeat stall was invisible in production: the only trace sat at
debug level, and the heartbeat queue was the one queue whose size was
never measured. Diagnosing one meant working backwards from the alerts
it caused.

Report throughput and queue size every 5 minutes at info instead.

Assisted-by: Claude Code:claude-opus-5
@edospadoni
edospadoni deployed to fix_link_failed - my-collect-qa PR #162 July 29, 2026 08:16 — with Render Active
@gsanchietti
gsanchietti marked this pull request as ready for review July 29, 2026 08:17
@edospadoni
edospadoni deployed to fix_link_failed - my-collect-qa PR #162 July 29, 2026 15:01 — with Render Active
@edospadoni
edospadoni deployed to fix_link_failed - my-collect-qa PR #162 July 30, 2026 04:52 — with Render Active
@edospadoni

Copy link
Copy Markdown
Member

down deploy

@github-actions

Copy link
Copy Markdown
Contributor

💤 Preview environment suspended

Compute billing stopped for:

  • my-collect-qa PR #162

Skipped (not found):

  • my-mimir-qa PR #162
  • my-backend-qa PR #162
  • my-frontend-qa PR #162
  • my-proxy-qa PR #162

A suspended service stays down on push. To bring it back, comment up deploy to resume, then update deploy to rebuild the latest commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants