Beacon: end-to-end monitoring for Frappe Cloud V2

Report of 14 November 2026, updated the same day after an audit of the reporting path. Beacon is the incident manager, SLO panel and public status page. This note records what changed, what the audit found, what was tested on a local region, and what is still open.

Atlas #607Pilot #828Central #714Cargo #141Datum #20Beacon

The problem

Beacon reads telemetry from Datum, the regional ClickHouse store. It raises an alert when a rule query returns a row. A person sees an incident, and customers see the status page.

Before tonight, many failures did not reach Beacon. Atlas sent no Error Logs to Datum. The Atlas error gauge was always 0. Two SLI queries read metrics that no service sent. Central had no telemetry at all. Pilot sent no site states and kept no record of failed deliveries to Central.

A failure that does not reach Datum cannot become an alert. So the first job was to close those gaps, then to write rules, then to break things and look at the result.

How data reaches an incident

Producers write to Datum. Beacon only reads Datum. A person decides what customers see.

What changed

Producers

AppChangeWhy
AtlasGET /api/atlas/beacon/resources, Central only, with an ETag. It lists Atlas itself, hosts, VMs, service nodes and Cargo.Beacon must match telemetry to a resource. Alerts about Atlas now land on the atlas resource, not on every resource of the region.
AtlasThe Error Log gauge counts through the Error Log controller.Error Log is a virtual DocType in its own log database. The old count read a stale table and was always 0.
AtlasThe Error Log publisher cursor uses the stored time form.The log store compares time as text. The ISO cursor with a T excluded every new row, so nothing was ever sent. After the fix, 81 lines reached Datum in the first run.
Atlasservice_proxy_requests_total gets an origin label from upstream_header_time.A site can send its own 502. Only a 5xx that the proxy made counts against the Networking SLO.
Pilotpilot_sites{state} after each round of uptime pings, with zeroes.The Sites SLI read a metric that did not exist.
Pilotnotifications.json.log: one line for each delivery to Central, with delivered and error.Beacon can now alert when Pilot events do not reach Central.
CentralEach minute, new Error Logs and health gauges go to the Datum of the Region with Central Telemetry Region set, as resource central. Only one Region can have the checkbox.Central is global and has no Datum. Its errors, stuck work, failed payments and failed webhooks were visible only in Desk.

Beacon

Reporting path audit

A second pass checked the whole path: the producers, the Datum API, the ClickHouse schema, datum_client and every rule. Three Codex audits (gpt-6.1-sol, high effort) read the code. Each finding below was checked on a local ClickHouse 26.10 before the fix.

What would have stopped all alerts

FindingEffectFix
samples_recent, latest_value and counter_increase existed only in the local ClickHouse.No Beacon rule could run on a deployed Datum.Datum migration 006_beacon.sql (Datum #20), with a backfill of the last 2 days on its first run.
No ClickHouse user for Beacon.Beacon had no safe way to read.A select-only beacon user with a fixed profile: 20 s, 4 GB, 4 threads, 100,000 rows. Cargo generates its password and sends it to the migration (Cargo #141).
Pilot posts Fluent Bit logs as a bare array.Datum refused every Pilot log batch.Already fixed on Datum main (Datum #19). It needs a deploy of each Datum host.

What would have given wrong alerts

FindingFix
Atlas marked any stopped VM as Suspended, so a crashed VM lost its alerts.Only a sleeping VM is Suspended.
cargo-silent: the alias 'cargo' AS resource_id replaced the column in its filter.Filter in a subquery. The rule fired always unless the token id was exactly cargo.
Central gauges: a cleared problem kept its old value for 5 minutes.Each collection has one timestamp, and the rules read only the newest one.
Central request counts were lost when a push failed.They go back to Redis and leave with the next push.
A sample from a fast clock stayed the newest value.The views and the Pilot queries leave out samples more than 1 minute in the future.
One broken site on each of 5 servers looked like a regional backup failure.A server counts only when half or more of its sites failed.
One new Atlas exception opened an alert for an hour.A new error must repeat 3 times.

New coverage

Verification: 58 rule and SLI definitions pass the Beacon header check, and all 58 queries run on ClickHouse. Datum, Cargo, Central, Atlas and Pilot tests pass.

Rule fixes from review

Codex (gpt-6.1-sol, high effort) reviewed every rule and every code change. These are the defects that would have hidden a real outage:

RuleDefectFix
host-downAtlas stops sending sync age after one hour, so a dead host resolved itself after about 75 minutes.Start from the host inventory. A Running host with no report stays failing.
object-storage-unavailableWhen every Garage node went silent, the alert resolved.A node that reported in the last hour and stopped counts as down. Only a fresh healthy report resolves it.
proxy-error-spikemax - min on a counter is wrong after a restart.Reset-aware counter_increase.
atlas-public-ips-exhaustedAtlas makes allocations lazily, so a large healthy pool looked empty.Free = capacity minus allocations that are not Available, at one collection time.
atlas-service-nodes-failed, cargo-build-stuckThe last Failed or stuck sample stayed after recovery.Read only the latest collection.

Tests on the local region

ScenarioResult
Real Atlas job failures and Error LogsAlerts fired and opened incident "Atlas jobs failing"
Garage cluster unavailable (synthetic)Critical alert, severity of the incident raised, chat post sent
All Garage nodes silent (synthetic)Rule stays failing; one fresh healthy node clears it
Cargo build failed and stuck (synthetic)Alerts fired and joined the incident
Simulated Central failure, 6 Error LogsLines reached Datum; central-errors went Pending
Pilot deliveries to Central fail with HTTP 502 (synthetic logs)pilot-central-delivery returned the row
Subscribe, confirm, publish, replay, unsubscribeOne email per public update, none on replay, none after unsubscribe; RSS valid
Proxy origin label, 10 log lines in Vector 0.46.1All correct, also for old proxy images
Host sync loss on one host (synthetic sample)No new alert: a real Atlas sample in the same window reset the latest value. A real test needs the host stopped.

Unit and integration tests: Atlas route, error log and router tests pass; Pilot 41 tests and mypy pass; Central 3 new tests pass. Ruff passes in every changed app. Beacon has no tests yet, by its own rule.

Real findings

Still open

Decisions for the team

Known gaps