Beacon: incident manager and status page for Frappe Cloud V2

Latest engineering review · 13 November 2026. Read the operator flows and page-by-page field hierarchy. It separates current behavior, source findings and proposed layouts. UTC handling, Publish impact rows, related evidence and public health handling need corrections. Review the proposed forms in moki.

A design for one small Frappe app. It reads the health that each layer of Frappe Cloud already reports, finds problems before customers do, groups them into root-cause incidents, calls the on-call engineer, tracks SLOs and error budgets, and publishes a status page.

Plan · November 2026 · Revision 6: each layer watches the layer below, SLO burn-rate alerts, an infrastructure-only resource registry · Status: proposed · Earlier rounds reviewed with GPT-6.1 Sol (high effort) and Claude Fable 5.2 (medium effort) · Mockups in moki: beacon-status v4

Summary. Beacon is one global Frappe app. Staff use Desk as a control panel, and customers see only the status page. Every layer of Frappe Cloud already watches the layer below it: Pilot pings its sites, metald checks its VMs, and Atlas checks its hosts and service nodes. Beacon does not repeat that work. It reads the counts that each layer reports to Datum, and it acts one level up. A failing site is Pilot's job. Many failing sites in a region is Beacon's job. Beacon pages on symptoms, as Google SRE recommends: each customer-facing service has an SLO, and a fast error-budget burn calls the on-call engineer. A few cause rules (a host is down, VMs fail on one host, a service node is not ready, Atlas is silent) give the incident its root cause and scope. The resource registry holds only infrastructure (hosts, VMs, service nodes), pulled from Atlas, so it stays small. Beacon only reads ClickHouse.
  1. Latest operator review and response flows
  2. Situation
  3. Goals, non-goals, scale
  4. Architecture
  5. Key decisions
  6. Who watches what
  7. One problem, end to end
  8. Concepts and DocTypes
  9. DocType reference
  10. Resource registry
  11. Rules and evaluation
  12. SLOs and error budgets
  13. Incidents and impact
  14. Maintenance and muting
  15. Service status and uptime
  16. On-call and paging
  17. State handling
  18. Scenarios
  19. Integrating a V2 service
  20. REST API
  21. Status page
  22. Desk control panel and roles
  23. Changes in Datum and other services
  24. Scale numbers
  25. Rollout and checks
  26. What we do not build
  27. Open questions
  28. Sources

1. Situation

Frappe Cloud V2 sends telemetry to Datum. Datum is a write-only service in front of ClickHouse. There is one Datum and one ClickHouse in each region. Readers query ClickHouse directly with a read-only account.

Today, alerts are temporary. A script in frappe/atlas makes three Insights Alerts: P1 every 5 minutes, and two P2 alerts every hour. Each one is a large SQL query that joins about 50 checks. When it returns rows, Insights posts a Markdown message to a chat webhook. The problems:

Frappe Cloud V1 (frappe/press) had a full incident system: Prometheus rules, Alertmanager webhook logs, an Incident with Validating → Confirmed → Acknowledged → Resolved, Twilio calls, night shifts and silenced alerts. We keep its ideas. We drop three things: a second alerting stack to operate, "the call was answered" as acknowledgement, and mute flags spread across many DocTypes.

2. Goals, non-goals, scale

Goals

  1. Find platform problems before a customer reports them, and page the right person once, with the root cause attached.
  2. Measure each customer-facing service with an SLI and an SLO, show the error budget, and report SLA attainment.
  3. Alerts that are easy to write and have state: Pending → Firing → Resolved, one episode per problem, no duplicates.
  4. Root-cause incidents with paging, acknowledgement, updates and a root cause analysis (RCA).
  5. A status page with regions, one status for each service, 90-day uptime bars, incidents and maintenance. Unlisted incidents with a private link, like Hetzner does.
  6. Maintenance windows that stop paging and, when announced in advance, do not count against the SLO.
  7. A short integration path, so every V2 service can use it.

Non-goals for v1

Scale target

Up to 100,000 resources per region (most are sites), about 10 regions. Sites reach Beacon only as counts, so Beacon stores about 10,000 infrastructure resources per region and a few alerts. We do not design for millions.

3. Architecture

Beacon is one Frappe site. It runs outside the regions it watches. It pulls the infrastructure list from Atlas in each region, and the map from Central server IDs to Atlas VM IDs from Central. It reads each region's ClickHouse with a read-only user and writes nothing there. Beacon serves the status page itself at /, and caches each response in Redis for one minute, so outage traffic peaks do not reach ClickHouse.

Each region owns its telemetry. Each layer reports the health of the layer below. Beacon reads it, and keeps all alert, incident and SLO state in its MariaDB.
PartJob
Datum + ClickHouse (per region)Stores samples, logs and traces. Owns telemetry.
Registry syncEvery minute, pulls each Resource Source (Atlas in each region, and Central's server ID map) and writes the changed rows to MariaDB.
Beacon evaluatorScheduler jobs and an RQ queue named beacon. Runs rule and SLI queries and writes transitions.
Beacon tickOne job every minute for time-based work: SLO burn rates, maintenance start and end, silence expiry, escalation steps, the heartbeat.
DeskStaff work incidents and configure everything. The Beacon workspace is the control panel.
Status pageA Vue app served at / of the Beacon site. It loads its data from guest API methods. Each response stays in Frappe's Redis cache for one minute.
NotifiersTwilio voice, email (Frappe Email Account), a chat webhook.

4. Key decisions

D1
Each layer watches the layer below. Beacon acts one level up. Pilot owns site health, metald owns VM health, Atlas owns host and service-node health. They already detect failures and tell the owner. Beacon reads their counts. One failing site or VM is not a Beacon alert. A failure that is too wide or too frequent for one owner to explain is.
D2
Page on symptoms, explain with causes. Each customer-facing service has an SLI and an SLO. A fast error-budget burn pages (Google SRE multiwindow, multi-burn-rate alerts). A short list of cause rules finds the broken host, node or watcher, and gives the incident its scope.
D3
Rules and SLIs are ClickHouse SQL. A rule returns only failing rows: resource_id, alert_key, value, detail. An SLI returns good, valid for each reporter, such as a VM. A read-only profile limits time, memory, threads and concurrency. No Python safe_exec.
D4
The registry holds infrastructure only, pulled from Atlas. Hosts, VMs and service nodes, with their parents and status. Sites are counts, not rows. Beacon filters rule rows with its copy, so an archived or stopped resource never alerts.
D5
One Alert row per episode, written only on transitions. A firing alert causes no writes.
D6
The incident invariant. After each evaluation and each tick, every Firing alert that is not suppressed belongs to an open incident. Beacon attaches it to an ancestor's incident, an incident in the same region with a firing cause, or a recent incident of its group, else reopens or creates one.
D7
One root-cause incident, impact derived. An incident has a few scope rows, such as "host bom-h12 and everything under it". The affected set is computed from the registry when someone asks.
D8
One Incident DocType with type Incident or Maintenance. A separate small Silence mutes paging for a set time.
D9
A person decides what customers see. Beacon never publishes an incident and never reopens a public one. The only automatic public signal is the computed service status, and it changes only after 3 bad minutes.
D10
Desk is the control panel. The API is small. It covers acknowledge and resolve for chat-ops, the resource list that sources serve, and Twilio callbacks.
D11
Fail loudly, never silently resolve. A query error never resolves an alert. A region with broken telemetry gives one alert. If Beacon stops, an external dead-man switch calls us.
D12
Central integration waits for phase 4.

5. Who watches what

Frappe Cloud is a stack: a host runs VMs, a VM runs a bench, a bench serves sites. Each layer already checks the layer below. The table shows what exists today and the one small addition that Beacon needs.

LayerWatched bySignal in DatumOne failureBeacon acts when
SitePilot in the VM. It pings /api/method/ping on loopback every few seconds.pilot_sites{state} per VM, summed over its benches: up, app_error, platform_down, maintenance. New, small.Pilot tells the site owner (site_down). An app error is the site's own problem.The Sites SLO burns.
VM and its Pilotmetald on the host: desired against observed state, and guest pings (3 missed = unreachable).metal_vm_wanted_running, metal_vm_unavailable{reason} per host. Exists.metald and Atlas act. The owner sees it in the dashboard.3 or more VMs (and 20%) on one host are unavailable, or the Servers SLO burns.
Host (metald)Atlas: syncs each host every few seconds and pushes the age every minute. BMC telemetry.atlas_host_sync_age_seconds{server}. Exists, but today it drops hosts with no sync in the last hour. Small fix.No other owner.Sync older than 5 minutes and metald silent: host down, one incident with everything under it. Sync old but metald alive: Atlas cannot sync (High).
Service node (proxy, gateway, storage)Atlas: readiness URL. The IPv6 router has none.atlas_service_ready{service, node}. Exists.No other owner.Not ready for 3 minutes.
Requests through the proxyThe proxy's JSON access logproxy_requests_total{class}: ok, app_error, platform_error. New, Vector config only.A bad upstream for one site is that site's problem.The Networking SLO burns.
Atlas, Datum, region networkBeaconA ClickHouse probe, and Atlas's newest sample.Not applicableThe probe fails, or Atlas is silent for 5 minutes.
BeaconAn external dead-man switchHeartbeatNot applicableThe heartbeat stops.
Beacon ──watches──> Atlas, Datum ──> hosts ──> VMs ──> sites
          reads the counts of: Atlas (hosts, nodes) · metald (VMs) · Pilot (sites)
  one item fails   -> its owner layer handles it, Beacon stays quiet
  many items fail  -> SLO burn (symptom) pages; a cause rule names the host or node
  a watcher fails  -> Beacon alerts on the watcher (Atlas silent, host down, region probe)

Why this works. A failure is always visible one level up. A dead site shows in Pilot's counts. A dead VM shows in metald's counts. A dead host shows in Atlas, and its metald goes silent. A failing proxy shows in its request counts. A dead Atlas or Datum shows in Beacon's probe. So Beacon never needs a "not reporting" rule for each leaf. A silent Pilot on a healthy VM is left out of the Sites SLI, and the control panel shows the coverage.

Why Pilot splits app errors. A site that fails because of its own code is the customer's problem, and Pilot already tells them. If it counted as down, 100 broken customer apps among 100,000 sites would use the whole budget of a 99.9% SLO. So Pilot asks one question for each failed ping: is the cause inside this site, or outside it?

Ping result (loopback to the bench's gunicorn)StateWhy
200upThe site answers.
503 with the site in maintenance modemaintenanceDown on purpose, for example during an update. Left out.
Connection refused or resetplatform_downgunicorn is not running. Pilot runs the bench, so this is ours.
Any failure while the bench's MariaDB health check failsplatform_downFrappe answers 500 when it cannot reach the database. Pilot runs the database, so this is ours.
Timeout (5 s) on every site of the benchplatform_downThe bench is hung or out of workers. Even when one busy site causes it, the other sites suffer, and we own that.
Timeout on some sites onlyapp_errorThat site's own requests are slow.
500 or another status, database healthyapp_errorA broken app, a bad site config or a failing hook in that site.

The rule in one line: a failure is platform_down when its cause is outside the site (process, database, or the whole bench), and app_error when only that site shows it. Pilot notifies the owner in both cases, as it does today. Only platform_down uses the Sites budget.

6. One problem, end to end

Follow a host failure in Mumbai. The host bom-h12 has 30 VMs and 400 sites.

  1. 07:12. The host loses power. Its metald stops reporting, and so do the Pilots in its VMs.
  2. 07:15. The Pilots have been silent for 3 minutes. No cause alert covers them yet, so the Sites SLI leaves them out. A Pilot restart looks the same, and must not page.
  3. 07:17. Atlas's sync for bom-h12 is older than 300 s and metald has been silent for 5 minutes. The cause rule "Host down" returns bom-h12. With pending_for 60 s it fires at 07:18. Beacon creates an Internal incident with scope "bom-h12, include descendants", severity Critical. The host has no parent, so it pages at once.
  4. 07:18. Now a cause alert covers the silent reporters, so the SLIs count them as bad. Sites: 400 of 50,000 sites is 0.8% bad, a burn rate of 8 for 99.9%. Servers: 30 of 3,000 VMs is 1% bad, a burn rate of 10. Neither passes the fast page (14.4). The Servers 6-hour alert would fire after about 3.6 hours, and it would join this incident because the incident has a firing cause alert.
  5. The primary responder does not press 1. After 2 minutes (Critical), Beacon calls the second responder, who presses 1. The incident moves to Investigating.
  6. The engineer uses Publish: Unlisted, first public update, affected services "Servers · bom" and "Sites · bom", impact Partial Outage. Support copies the private link and the VM list from "Export affected resources".
  7. 07:50. The power supply is replaced. The host syncs, VMs boot, Pilots report. The cause alert recovers after resolve_after. The incident is Unlisted, so Beacon posts "all alerts resolved" to chat. The engineer posts a final update and resolves it. The control panel shows the cost: about 0.6% of the month's Sites budget and 0.8% of the Servers budget.

7. Concepts and DocTypes

A new engineer needs seven ideas: Rule (a query that finds a cause), SLI and SLO (how good a service is, and how good it must be), Alert (one problem on one resource), Incident (what people work on, and what customers may see), Silence (mute paging for a time), Service (one line on the status page, with its SLO) and Registry (which infrastructure exists in a region). v1 has 14 DocTypes. All times are UTC.

DocTypeOne row perWritten byName
IncidentIncident or maintenanceBeacon and staffINC-00412
AlertAlert episodeBeacon onlyrandom
SilenceMuteStaffSIL-00042
Alert RuleCause rule, or the SLO burn rule of a serviceGit sync, an admin, or Beaconrule_key
Rule EvaluationRule and regionBeaconrandom
ResourceRegion, host, VM or service nodeRegistry sync (admins: monitoring fields)bom:bom-h12
Resource SourceRegional service that serves a listAdminbom-atlas
RegionRegionAdminbom
ServiceLine on the status page, with SLI and SLOGit sync or an adminsites
Service StateService and regionBeaconrandom
Service MinuteService, region and minute (kept 3 days)Beaconrandom
Service DayService, region and UTC dayBeaconrandom
Beacon SettingsSingleAdminn/a
NotificationCall, email or chat postBeaconrandom

Child tables: Incident Scope, Incident Service, Incident Update, Beacon Responder, and Region Item (for region pickers). Phase 4 adds Beacon Event (an outbox to Central).

Region ── Resource Source (Atlas) ── fills ──> Resource ──> Resource (parent)
   └──── Rule Evaluation <── Alert Rule ──> Alert ──> Incident
                              ^                ^         ├── Incident Scope   ──> matches Resource
 Service ── SLO burn rule ────┘   Silence ─────┘ mutes   ├── Incident Service ──> Service
    └──> Service State, Service Minute, Service Day      ├── Incident Update
                                                         └── Notification     ──> Beacon Responder

8. DocType reference

Original design layouts. Every implemented DocType now has the Beacon prefix in the single Beacon module. The operator review gives the latest proposed form and tab order. These older diagrams do not certify that each evidence panel or action is complete.

Each card shows one Desk form from top to bottom. Tabs come in order, and sections stack inside a tab. Columns sit side by side, and the field order in a column is the position on the form. A grey field is read-only: Beacon sets it, or an action changes it. A red star marks a required field. Below each form, the table lists its buttons. Permissions use the two roles from "Desk workflow and roles".

Two rules keep the forms safe. First, a field that drives a state machine (status, visibility, escalation, paging paused) is read-only, and only an action changes it, so every change runs the same checks. Second, a document that Beacon writes (Alert, Rule Evaluation, Resource, Service State, Service Minute, Service Day, Notification) has no New button and no delete permission.

Editable fieldRead-only fieldRequired
IncidentNamed INC-.##### · track changes · Responder: create, read, write · nobody deletes
Tab · Overview
DataTitle title
SelectType typeIncident · Maintenance. Set once.
SelectSeverity severityLow · Medium · High · Critical. Beacon raises it, never lowers it.
SelectStatus statusTriggered · Investigating · Identified · Monitoring · Resolved · Merged
Maintenance: Scheduled · In Progress · Completed · Cancelled. Changed only by actions.
SelectVisibility visibilityInternal · Unlisted · Public. Changed only by Publish.
Link IncidentMerged into merged_intoShown when Merged
Link UserAcknowledged by acknowledged_by
DatetimeAcknowledged at acknowledged_at
DatetimeResolved at resolved_at
Maintenance window shown for Maintenance
DatetimeScheduled start scheduled_startLocked when it starts
DatetimeScheduled end scheduled_endCan be extended until it passes
CheckMute SLO burn mute_slo_burnOn by default. Suppresses burn alerts of the regions in scope.
CheckExcluded from SLO excluded_from_slo1 only if Public and created before the start
Scope
Table · Incident ScopeScope scopeColumns: region*, resource_type, resource_id, include_descendants. Blank = any. Locked when a maintenance starts.
Alerts
HTMLAlerts alerts_htmlCounts by status, the 50 newest Firing alerts, a link to the full Alert list
Internal collapsed
CheckCreated by Beacon created_by_beacon
Small TextGroup keys group_keysOne per line. A manual merge adds the merged keys.
DataShare token share_tokenHidden. Read by "Copy private link".
Tab · Impact
Table · Incident ServiceAffected services affected_servicesColumns: service*, region, impact* (Degraded · Partial Outage · Major Outage · Maintenance). The status page uses it only when visibility is not Internal.
Tab · Updates
Table · Incident UpdateUpdates updatesColumns: posted_at, status, message, is_public, posted_by. Added only by "Post update". Rows are read-only.
Tab · Paging
SelectEscalation escalationNone · Waiting · Calling · Done
IntPage round page_round
IntPage index page_indexPosition in the responder list
DatetimeNext page at next_page_atThe tick acts at this time
Notifications
HTMLNotifications notifications_htmlCalls, emails and chat posts for this incident, newest first
Tab · RCA
Text EditorInternal RCA rcaStaff only
Text EditorPublic RCA public_rcaShown on the incident page when it is published and resolved
ActionShown whenRoleWhat it does
AcknowledgeTriggered, or paging is activeResponderStops paging (escalation Done). Sets acknowledged_by and acknowledged_at. Triggered → Investigating. Any other staff action on a Triggered incident does the same.
Post updateNot Resolved or MergedResponderDialog: next status (Investigating, Identified, Monitoring or Resolved), message*, public (on by default when not Internal). Adds an Incident Update row. Resolved runs the Resolve check.
PublishInternalResponderDialog: Unlisted or Public, affected services with impact, first public message*. Unlisted creates the 32-character share_token.
Change visibilityUnlisted or PublicResponderPublic ↔ Unlisted, or back to Internal. Internal asks for confirmation, takes the page down and clears the token.
Copy private linkUnlistedResponderCopies https://status…/i/<token>/. The link of a merged incident redirects to the target.
Regenerate private linkUnlistedResponderCreates a new token. The old link stops working at once, and its cached response is cleared.
Page on-callEscalation None or DoneResponderStarts paging at round 1, without page_delay.
Merge intoOpen incident (not Maintenance)ResponderPick an open incident. Alerts, scope rows and group keys move to it. Status → Merged. A published incident cannot merge into an Internal one.
Export affected resourcesAlwaysResponderCSV of the scope, expanded from the registry (hosts and VMs).
ResolveOpen incidentResponderDialog: final message, public. Refused while unsuppressed alerts fire, and offers "Silence the remaining N alerts for 4 hours and resolve".
ReopenResolved less than 7 days agoResponder→ Investigating. Paging stays off until "Page on-call".
Start nowMaintenance, ScheduledResponder→ In Progress. Locks the start and the scope.
ExtendMaintenance, In ProgressResponderSets a later scheduled_end.
CompleteMaintenance, In ProgressResponder→ Completed. After a 10-minute grace, alerts that still fail go into one incident.
CancelMaintenance, ScheduledResponder→ Cancelled.

On save. type and created_by_beacon cannot change. A maintenance needs start < end. A Public maintenance with no Maintenance impact row shows a warning.

Indexes. (status, type), (visibility, status), and an is_open check for the list filter and the invariant.

List view. name, title, type, status, severity, visibility, modified. Default filter: open only. The list has a "New maintenance" button. Colors: Triggered red, Investigating and Identified orange, Monitoring blue, Resolved green, maintenance purple.

AlertRandom name · title "<rule title> · <resource_id>" · written only by Beacon, with bulk SQL · read-only for everyone
SelectStatus statusPending · Firing · Resolved
SelectResolution resolutionCleared · Recovered · Resource removed · Disabled
SelectSeverity severity
Link Alert RuleRule rule
Link RegionRegion region
Link IncidentIncident incidentNULL or an open incident, never a closed one
Link ResourceResource resource
DataResource type resource_type
DataAlert key alert_keyFor example a mount point, or fast/slow for an SLO burn
Values
FloatFirst value first_value
FloatLast value valueWritten on transitions only. The form shows the live value from ClickHouse.
DataDetail detail
Timeline
DatetimeStarted at started_at
DatetimeFired at fired_at
DatetimeClean since clean_since
DatetimeResolved at resolved_at
CheckSuppressed suppressed
DataSuppressed by suppressed_bySIL-00042, a maintenance, or a held removal
ActionShown whenRoleWhat it does
SilencePending or FiringResponderDialog with region, resource, rule and alert_key filled in. Duration 1 h, 4 h, 1 day, 7 days or custom (at most 30 days). Reason*. Creates a Silence.
Open runbookThe rule has a runbook URLResponderOpens it.

Hidden. open_key (unique, NULL once resolved).

Indexes. (region, status, suppressed, incident) for the invariant, (rule, region, status), (incident, status), (resource, status), (status, resolved_at) for cleanup. Track changes off.

List view. resource, rule, severity, status, incident, started_at. Default filter: Pending or Firing. Sidebar filters: region, rule, resource_type, suppressed. Colors: Firing red, Pending orange, suppressed grey, Resolved green.

SilenceNamed SIL-.##### · Responder: create, read, write
Match blank = any; at least one is required
Link RegionRegion region
DataResource type resource_type
DataResource ID resource_id
CheckInclude descendants include_descendantsA silenced host also mutes its VMs
Link Alert RuleRule rule
DataAlert key alert_key
Time
DatetimeExpires at expires_atAt most 30 days from now. A silence starts when it is saved; use a maintenance for future work.
DatetimeRevoked at revoked_at
Link UserRevoked by revoked_by
Small TextReason reason
HTMLMatching alerts matching_htmlHow many open alerts it matches now
ActionShown whenRoleWhat it does
RevokeActiveResponderEnds it now. At the next tick, matching alerts are no longer suppressed and join an incident.
ExtendActiveResponderSets a later expires_at, at most 30 days from now.
Show matching alertsAlwaysResponderOpens the Alert list with the same filters.

State. Not stored. The list shows Active, Expired or Revoked from expires_at and revoked_at.

On save. The match fields cannot change after save. Create a new silence instead.

List view. name, reason, resource_id, rule, expires_at. Default filter: not expired.

Alert RuleNamed by rule_key · Admin: create, write · Responder: read
Tab · Rule
DataTitle title
DataRule key rule_keyFile path in Beacon, or desk:<slug>
SelectSeverity severityLow · Medium · High · Critical
DataResource type resource_typeHost, Server, Proxy Server, Region, …
CheckEnabled enabled
SelectKind kindSQL · SLO burn. Set once.
Link ServiceService serviceSLO burn rules only
DataOwner team owner_team
DataRunbook URL runbook_url
CheckLoaded from file is_from_file
Query
Code · SQLQuery queryReturns resource_id, alert_key, value, detail. Hidden for SLO burn rules.
Timing
Int · sInterval interval60. pending_for must be at least the interval, except for SLO burn rules.
Int · sPending for pending_for300
Int · sResolve after resolve_after120
Regions
Table MultiSelect · Region ItemRegions regionsEmpty = all regions
Tab · Evaluations
HTMLEvaluations evaluations_htmlOne row per region: state, last success, duration, rows, last error, Run now
ActionShown whenRoleWhat it does
TestKind SQLAdminRuns the query in every region. Shows rows, duration, 20 sample rows and contract errors. Saves nothing.
Silence ruleAlwaysResponderOpens a new Silence with this rule.

On save. A rule loaded from a file is read-only except enabled. Save runs the contract check in one region and refuses an error. It creates or disables the Rule Evaluation rows.

SLO burn rules. Beacon creates one per Service. The tick computes them from Service Minute and Service Day, with alert keys fast, medium and slow.

List view. title, kind, severity, resource_type, enabled. Red when an evaluation is Broken, orange when Erroring.

Rule EvaluationRandom name · unique (rule, region) · written by Beacon · read-only
Link Alert RuleRule rule
Link RegionRegion region
SelectState stateHealthy · Erroring · Broken
DatetimeNext run at next_run_at
DatetimeLast run at last_run_at
DatetimeLast success at last_success_at
Int · msLast duration last_duration_ms
IntLast row count last_row_count
IntUnknown rows unknown_rowsRows for resources not in the registry
Errors
IntConsecutive errors consecutive_errors
CodeLast error last_error
ActionShown whenRoleWhat it does
Run nowThe rule is enabledAdminQueues this evaluation now.

Index. (next_run_at) for the scheduler.

List view. rule, region, state, last_success_at, last_duration_ms. Sorted by state, Broken first.

ResourceNamed {region}:{resource_id} · filled by the registry sync · no New button
From the source
DataResource ID resource_id
DataResource type resource_typeRegion · Host · Server · Proxy Server · …
SelectStatus statusPending · Active · Suspended · Terminated
Link RegionRegion region
Link ResourceParent parent_resource
Link Resource SourceSource sourceEmpty for Region rows made by Beacon
DataTitle title
DataTelemetry ID telemetry_idCentral server ID, from Central's map. Pilot's rows use it.
DatetimeActive since active_sinceStart of the 10-minute grace
DatetimeTerminated at terminated_at
Sync
CheckChecked is_checkedActive, ancestors Active, monitoring on, removal not held. The grace is applied at filter time.
DataPath path/bom-h12/server-a, for ancestor queries
DataRow hash row_hashHidden. Lets the sync write only changed rows.
Monitoring changed only by actions and the sync
CheckMonitoring disabled monitoring_disabledNever check this resource
Small TextReason disabled_reason
Link UserDisabled by disabled_by
CheckRemoval held removal_heldMissing from a list that was held
Now
HTMLNow now_htmlOpen alerts on this resource, and open incidents that affect it through an ancestor
ActionShown whenRoleWhat it does
Disable monitoringMonitoring onAdminDialog: reason*. Open alerts resolve as Disabled.
Enable monitoringMonitoring offAdminChecks start again after the grace.
SilenceAlwaysResponderOpens a new Silence for this resource.
ChildrenAlwaysResponderOpens the Resource list filtered by parent.

Cleanup. Beacon deletes a Terminated row after 90 days, the same as resolved alerts, so no alert link dangles.

Indexes. (region, path), (region, telemetry_id), (parent_resource), (source, status).

List view. resource_id, resource_type, status, region, parent. Sidebar filters: region, type, status, checked.

Resource SourceNamed {region}-{source_key} (bom-atlas), or {source_key} for a global one (central) · Admin: create, write · Responder: read
SelectKind kindResources · Telemetry IDs
Link RegionRegion regionRequired for Resources. Empty for Central.
DataSource key source_keyatlas, central
DataTitle titleAtlas
CheckEnabled enabled
DataBase URL base_urlBeacon calls /api/beacon/resources or /api/beacon/telemetry-ids
PasswordToken token
Last sync
DatetimeLast attempt at last_attempt_at
DatetimeLast success at last_success_at
IntRow count row_count
IntOrphans orphan_countRows whose parent is unknown
DataETag etag
Small TextLast error last_error
Held removals shown when removals are held
IntHeld removals held_removals
DatetimeHeld since held_since
ActionShown whenRoleWhat it does
Fetch nowEnabledAdminFetches now without the ETag. Shows added, changed and removed rows.
Apply held removalsRemovals heldAdminConfirm dialog with the count and the first 20 IDs. Removes them, and their alerts resolve as "Resource removed".

Telemetry IDs. A full fetch without the ETag every 15 minutes. It only writes telemetry_id on matching Resources, and never adds, removes or holds anything.

List view. kind, title, region, enabled, row_count, last_success_at. Red when no good fetch for 15 min, orange when removals are held.

RegionNamed by region code · Admin: create, write · Responder: read
DataRegion regionbom. Set once.
DataTitle titleMumbai
SelectStatus statusActive · Disabled
DataWildcard domain wildcard_domainbom.frappe.cloud
ClickHouse collapsed
DataURL clickhouse_url
DataDatabase clickhouse_databasedatum
DataUser clickhouse_userbeacon (read-only)
PasswordPassword clickhouse_password
Telemetry
SelectState telemetry_stateOK · Unreachable · Suspect
DatetimeChecked at telemetry_checked_at
PercentHosts reporting reporting_percentHosts that Atlas synced and that have a metald sample in 5 min. Under 50%: Suspect.
Status page
CheckShow on status page show_on_status_page
IntSort order sort_order
ActionShown whenRoleWhat it does
Check connectionAlwaysAdminRuns SELECT 1 as the beacon user and shows the latency and the profile limits.
Disable / EnableAlwaysAdminDisabled: no evaluation. The tick closes its open alerts as Disabled.

On insert. Beacon creates a Resource of type Region for it. Region-wide alerts, such as SLO burns, use that resource.

List view. title, region, status, telemetry_state (green OK, orange Suspect, red Unreachable).

ServiceNamed by service_key, for example sites · Admin: create, write · Responder: read
DataTitle titleSites
DataService key service_keyRead-only when loaded from a file
SelectScope scopeRegion · Global
CheckShow on status page show_on_status_page
IntSort order sort_order
CheckLoaded from file is_from_file
Where
Table MultiSelect · Region ItemRegions regionsRegion scope. Empty = all.
Link RegionQuery region query_regionGlobal scope: the ClickHouse that has its telemetry
SLI
Small TextDescription descriptionPublic. Shown under the service name.
Code · SQLSLI query sli_queryReturns resource_id, good, valid, last_ts for each reporter seen in 30 minutes
Objectives
PercentSLO target slo_targetDefault 99.9, over 30 days. Admins can change it.
PercentSLA target sla_targetOptional. The contract, lower than the SLO.
CheckPage on burn page_on_burnOff: burn alerts are Medium (chat and email)
ActionShown whenRoleWhat it does
TestAlwaysAdminRuns the SLI query in each region. Shows good, valid, the ratio and the status it would get.
View statusAlwaysResponderOpens Service State for this service: status, budget left and burn rates per region.

List view. title, scope, slo_target, show_on_status_page.

Service StateRandom name · unique (service, region) · written by Beacon every minute · read-only
Link ServiceService service
Link RegionRegion region
DatetimeChecked at checked_at
SelectStatus statusOperational · Degraded · Partial Outage · Major Outage · Maintenance · Unknown
SelectCandidate status candidate_statusBecomes status after 3 minutes (worse) or 2 minutes (better)
DatetimeCandidate since candidate_since
PercentSLI, last minute last_ratio
PercentBudget left, 30 days budget_left
DataBurn 1 h / 6 h burn_rates14.4 and 6 page

Hidden. last_counted_minute, so a minute is never counted twice.

List view. service, region, status (colored), budget_left, burn_rates, checked_at. This list is the control panel table on the workspace.

Service MinuteRandom name · unique (service, region, minute) · written by Beacon with bulk SQL · kept 3 days · no form use
Link ServiceService service
Link RegionRegion region
DatetimeMinute minuteUTC, start of the minute
SelectStatus status
IntGood good
IntValid valid0 for an unknown minute
IntBad reporters bad_reportersA burn alert pages only with 3 or more

Why. The burn windows up to 3 days sum these rows. About 40 rows a minute for 4 services in 10 regions, about 170,000 rows kept.

Service DayRandom name · unique (service, region, date) · written by Beacon · read-only
Link ServiceService service
Link RegionRegion region
DateDate dateUTC day
Counts
IntGood good
IntValid valid
IntDegraded minutes degraded_minutes
IntOutage minutes outage_minutesPartial or Major
IntMaintenance minutes maintenance_minutesExcluded maintenance only
IntObserved minutes observed_minutes

Derived, not stored. Day SLI = good / valid. Unknown minutes = elapsed − observed. The status API and the SLO report compute them.

List view. Report view grouped by service and region. The status page reads 90 days, the 30-day budget reads 30 days.

Beacon SettingsSingle · Admin: write · Responder: read (passwords hidden)
Tab · On-call
Table · Beacon ResponderResponders respondersColumns: user*, phone, email (fetched from the user), active. Row order is the call order.
Primary
Link UserPrimary override primary_overrideChanged by "Set primary override"
DatetimeOverride until override_until
Timing
Int · sPage delay page_delay_seconds90
Int · minRepeat every repeat_every_minutes15
Int · minBackup after, Critical backup_after_minutes_critical2
Int · minBackup after, High backup_after_minutes_high5
IntMax rounds max_rounds3, for High. Critical repeats until acknowledged.
Tab · Channels
CheckPhone calls phone_calls_enabled
DataTwilio account SID twilio_account_sid
PasswordTwilio auth token twilio_auth_token
DataFrom number twilio_from_number
CheckEmail email_enabled
Link Email AccountEmail account email_account
CheckChat chat_enabled
PasswordChat webhook URL chat_webhook_url
Tab · Status page
DataTitle status_page_titleFrappe Cloud Status
DataDomain status_page_domain
Tab · Safety
CheckPaging paused paging_pausedChanged only by the actions
Small TextPaused reason paused_reason
PasswordHeartbeat URL heartbeat_urlDead-man switch
Int · minReopen window reopen_window_minutes30
ActionShown whenRoleWhat it does
Set primary overrideAlwaysResponderDialog: active responder and until. Paging calls this person first.
Pause paging / Resume pagingAlwaysAdminDialog: reason*. While paused, the tick sends no call or email. Escalations continue when paging resumes.
Send test pageAlwaysAdminDialog: responder and channel. Sends a test call, email or chat post.

On save. Phone calls need at least one active responder with a phone number.

Constants, not settings. Retention: resolved alerts 90 days, cleared alerts 7 days, notifications 180 days, Service Minute 3 days. New-resource grace 10 minutes. Status thresholds 99.5 / 95 / 80 %.

NotificationRandom name · written by Beacon · read-only
Link IncidentIncident incident
Link UserResponder responder
SelectChannel channelCall · Email · Chat
SelectStatus statusQueued · Sent · Answered · No answer · Acknowledged · Failed
IntRound page_round
DataProvider ref provider_refTwilio CallSid
DatetimeSent at sent_at
DatetimeAnswered at answered_at
Small TextError error

Indexes. (incident, sent_at), (provider_ref).

List view. incident, responder, channel, status, sent_at. The escalation step reads it.

9. Resource registry

Beacon needs to know which infrastructure exists, and how it nests: a host has VMs, and a VM can be a proxy node. It uses this to skip archived or stopped resources, to build incident scope, and to export who is affected. Sites are not in the registry. Pilot reports them as counts per VM.

The registry has one source in most regions: Atlas. It knows every host, VM and service node. A Resource Source row in Desk points Beacon at it. Another regional service that owns infrastructure can be added the same way. A region has about 10,000 rows.

GET {base_url}/api/beacon/resources        Authorization: Bearer <token>
If-None-Match: "<etag>"                     -> 304 when nothing changed
200  ETag: "<count>-<max modified>"         one gzip response, no paging
{"resources": [{"resource_id": "bom-h12", "resource_type": "Host", "parent_id": "",
                "title": "bom-h12", "status": "Active"},
               {"resource_id": "vm-7f3a", "resource_type": "Server", "parent_id": "bom-h12",
                "title": "server-a", "status": "Active"}, ...]}

Server IDs from Central. Central mints and renews Pilot's Datum token with Central's server ID, so Pilot's rows in Datum carry that ID, not the Atlas VM ID. Central already knows the map from server ID to Atlas VM ID and region. It serves the map, and Beacon pulls it like a resource list. Atlas stores nothing extra.

GET {central_url}/api/beacon/telemetry-ids    Authorization: Bearer <token>    (ETag, as above)
{"telemetry_ids": [{"telemetry_id": "srv-a91c", "region": "bom", "resource_id": "vm-7f3a"}, ...]}

Contract for a source. The list is the current state from one read. The ETag comes from the row count and the newest modified time, so an unchanged list costs one cheap query. Rows have no fields that change on their own, such as usage numbers. A source sets a resource to Suspended or Terminated before it starts to tear it down.

10. Rules and evaluation

The standard cause rules

Cause rules name the broken thing. They are few on purpose. Each one points to one fix. They live in Beacon's repository under beacon/rules/.

RuleSignalFires whenSeverityIncident scope
Host downatlas_host_sync_age_seconds{server} and the host's own metald samplesSync over 300 s and no metald sample for 5 min, for 60 sCriticalThe host, with descendants
Atlas cannot sync hostThe sameSync over 300 s, metald still reportsHighThe host only
VMs unavailable on hostmetal_vm_unavailable, metal_vm_wanted_running3 or more and at least 20% of wanted VMs, for 5 minHighThe host, with descendants
Service node not readyatlas_service_ready{node}0 for 3 minHighThe node
Host resourcesmetald system metricsOne rule per family (disk, memory, ZFS, failed units, …) ported from alerts.py. The check name is the alert_key. Interval 300 s.MediumThe host
Atlas silent (built in)Newest Atlas sampleOlder than 5 minCriticalThe region
Region unreachable (built in)ClickHouse probeFails 2 times in a rowCriticalThe region
-- beacon/rules/host-down.sql
-- severity: Critical   resource_type: Host   interval: 60   pending_for: 60   resolve_after: 120
SELECT a.server AS resource_id, '' AS alert_key, a.age AS value,
       concat('no host sync for ', toString(round(a.age)), ' s, metald silent') AS detail
FROM (SELECT labels['server'] AS server, value AS age
      FROM datum.latest_value(metric = 'atlas_host_sync_age_seconds', window = 900)) AS a
LEFT JOIN (SELECT resource_id, max(ts) AS last_ts FROM datum.samples_recent
           WHERE metric = 'metal_build_info' AND ts > now() - INTERVAL 15 MINUTE
           GROUP BY resource_id) AS m ON m.resource_id = a.server
WHERE a.age > 300 AND m.last_ts < now() - INTERVAL 5 MINUTE

Atlas reports an age for every Running host, so the rule needs no list of expected hosts. A host's Datum token uses the host name, so resource_id and the server label match. A missing metald row reads as the epoch, which counts as silent. If Atlas itself stops, the ages stop too, and "Atlas silent" fires instead.

One evaluation

Every minute, the scheduler queues each due Rule Evaluation as a job with ID evaluate:{rule}:{region}. A region runs at most 2 jobs at a time, so one slow region cannot hold every worker. Each job does this:

1. Region Unreachable? -> skip, and count the skip as a run. The region alert covers it.
2. Run the SQL as the beacon user. HTTP timeout = max_execution_time + 5 s.
   Error, duplicates, or over 50,000 rows? -> consecutive_errors += 1; stop. Nothing changes.
   3 errors in a row -> Broken: red on the control panel, in one chat digest per region per hour.
3. Gap since last_success_at > 3 x interval? -> reset started_at (Pending) and clean_since.
4. Drop rows for unknown or unchecked resources (count unknown_rows).
5. Diff with open alerts:
     new row               -> Pending (Firing at once if pending_for = 0), suppression computed now
     row, alert Pending    -> Firing once failing for pending_for
     row, alert Firing     -> clear clean_since
     no row, alert Pending -> Resolved (Cleared)
     no row, alert Firing  -> set clean_since; Resolved (Recovered) after resolve_after
6. Write the changes with bulk SQL, in chunks of 1,000 rows. The open_key makes a retry safe.
7. If this run wrote a transition, enforce the incident invariant for this region.

Timers measure continuous time. pending_for must be at least the interval. Suppression is computed when an alert is created, and when a silence or maintenance starts, ends or changes (in the tick). It is not recomputed on every run.

11. SLOs and error budgets

This follows the Google SRE book and workbook. An SLI (service level indicator) is the share of good events: good ÷ valid. An SLO (service level objective) is the target for that share over 30 days. It is a field on each Service, 99.9% by default, and an admin can change it. The error budget is what the SLO allows to fail: 0.1% of the valid events. An SLA is a promise to customers, so it is lower than the SLO and has a contract behind it. It is an optional field on the Service, and Beacon only reports on it.

The v1 SLIs

ServiceGoodValidFromSLO
Sites (per region)Sites upUp + platform_down. App errors and maintenance are left out.Pilot, each minute, summed per VM (site-minutes)99.9%
Networking (per region)Requests the proxy did not failAll requests. platform_error = 502, 503 or 504 made by the proxy, or an upstream connect error.Proxy access-log counters99.9%
Servers (per region)Wanted VMs that are availableWanted running VMsmetald, each minute (VM-minutes)99.9%
Object storage (per region)Gateway requests without a 5xxAll gateway requestsStorage gateway counters99.9%
Dashboard and API (global, phase 4)Requests without a 5xxAll requestsCentral counters, when Central ships them99.9%

Every target in the table is the default. Change it on the Service; the burn rates and budgets use the new value from the next minute.

An SLI query returns one row per reporter seen in the last 30 minutes: resource_id, good, valid, last_ts. Beacon drops the rows of resources that are not checked, or that are inside a Public maintenance announced in advance. A reporter with no sample for 3 minutes counts its last valid as bad only while it or an ancestor has a Firing cause alert, such as "Host down". Otherwise it is left out. So a dead host counts its VMs and sites as down, and a Pilot restart, a sleeping VM or a Datum ingest gap never looks like an outage.

-- beacon/services/sites.sql   (one row per VM seen in the last 30 minutes)
-- Pilot ships all four states with one timestamp, summed over the VM's benches.
SELECT resource_id,
       argMaxIf(value, ts, labels['state'] = 'up') AS good,
       good + argMaxIf(value, ts, labels['state'] = 'platform_down') AS valid,
       max(ts) AS last_ts
FROM datum.samples_recent
WHERE metric = 'pilot_sites' AND ts > now() - INTERVAL 30 MINUTE
GROUP BY resource_id

Burn-rate alerts

The burn rate is how fast the budget goes: (1 − good ÷ valid) ÷ (1 − SLO). A burn rate of 1 uses the whole 30-day budget in 30 days. Beacon uses the three alerts from the SRE workbook. An alert fires only if both its long and short window are over the rate. The long window proves the problem is real. The short window makes the alert resolve a few minutes after the fix.

Budget usedLong windowShort windowBurn rateAlert
2%1 hour5 min14.4High, pages
5%6 hours30 min6High, pages
10%3 days6 hours1Low, chat and email

On the control panel

The workspace shows one row per service and region: status, the SLI of the last hour, budget left for 30 days, and the 1-hour and 6-hour burn rates. The "SLO and SLA" report shows each month: SLI, budget used, and whether the SLA was met. We do not automate SLA credits or release freezes. The budget is the input for that conversation.

12. Incidents and impact

The invariant

After every evaluation and every tick, Beacon takes one advisory lock for the region. It finds Firing, unsuppressed alerts with no incident (indexed: incident IS NULL). An open alert's incident is always empty or an open incident, because resolve and merge clear or move it. For each alert, in order:

  1. Ancestor. An open incident has a scope row that covers the alert's resource through its path. Join it.
  2. Cause. The alert is an SLO burn. Join the newest open incident in its region that has a Firing cause alert. Else join the newest incident in the region opened in the last 30 minutes.
  3. Group. An open incident has the alert's group key (rule and region) in its group_keys, and it is Triggered or less than 30 minutes old. Join it. An older, acknowledged incident does not swallow a second outage.
  4. Reopen. An Internal incident made by Beacon with that group key was resolved less than 30 minutes ago. Reopen it to Triggered and clear the acknowledgement.
  5. Create. Create an Internal incident in Triggered. If the resource has no parent, paging starts at once. Otherwise it waits page_delay (90 s), so a parent incident can take it.

A new cause alert in a region whose open incident has only burn alerts joins that incident and adds its scope row.

Joining is never silent. Every alert that joins posts to the incident's chat thread. A higher severity notifies again. An incident in Monitoring goes back to Investigating and pages again.

Merging. When an incident opens with a scope that covers alerts of another open, unacknowledged, Internal incident, only the covered alerts move. The other incident becomes Merged only when it is empty. Staff can merge by hand. A manual merge also moves the group keys, so the next alert of a merged region joins the target.

Scope. "Host down" and "VMs unavailable on host" incidents get the scope row "this host, include descendants". Other incidents start with the scope of their alerts. Staff can add rows.

Host bom-h12 fails                         Proxy bom-proxy-2 fails
host bom-h12      <- scope row,            proxy node bom-proxy-2   <- scope row
├── vm server-a      include descendants   affected service: Sites · bom = Degraded
└── vm server-b                            (shown to customers once published)
1 incident, 1 update stream, 1 private link. No row for each VM or site.

Who is affected? "Export affected resources" lists the hosts and VMs in scope. The sites on those VMs come from Central in phase 4.

Closing and publishing

13. Maintenance and muting

UseWhenAlertsSLO
MaintenancePlanned work with a start and an endRecorded, suppressed in its scope. With mute_slo_burn (on by default), the burn alerts of its regions are suppressed too.Reporters in its scope are left out only if it is Public and created before it starts
SilenceA mute for a known problem, from now, up to 30 days, with a reason. It can include descendants.Recorded, suppressedCounted
monitoring_disabledA resource we never want to check, with a reasonNot evaluatedIts rows are dropped

14. Service status and uptime

A service is one line on the status page, such as "Sites · bom". Its status comes from the SLI of the last minute: good ÷ valid over the checked reporters.

Checked in this order:
region Unreachable or Suspect, or no valid data, for 3 minutes -> Unknown
Public In Progress maintenance with this service (impact Maintenance) -> Maintenance
ratio >= 99.5% Operational, >= 95% Degraded, >= 80% Partial Outage, else Major Outage

Damping: a worse status must hold for 3 minutes, a better one for 2 minutes.
Shown on the page: worst(status, impact of open Public incidents)
Unknown: grey "Status unavailable", never the last green state.

15. On-call and paging

SeverityChatEmail to respondersPhone callBackup after
CriticalYesYesYes2 min
HighYesYesYes5 min
MediumYesYesNon/a
LowYesNoNon/a

16. State handling

Alert

FromEventToSide effects
noneRow for a checked resourcePending, or Firing if pending_for = 0Suppression computed
PendingFailing for pending_forFiringInvariant: join or create an incident
PendingNo row after a good queryResolved (Cleared)Deleted after 7 days
FiringNo row for resolve_afterResolved (Recovered)Incident may resolve itself
FiringRow again before resolve_afterFiringclean_since cleared
Pending, FiringQuery error, region UnreachableNo changeGap rule at the next success
Pending, FiringResource no longer checked (registry sync)Resolved (Resource removed)Not a recovery. One summary line on the incident.
Pending, FiringRule or region disabled, monitoring disabledResolved (Disabled)The tick or the sync
Pending, FiringRemoval heldNo changeSuppressed until applied

Incident

FromEventToSide effects
noneInvariant creates itTriggeredPaging starts, or waits page_delay
TriggeredAcknowledge, key press, or any staff actionInvestigatingEscalation Done
Investigating, Identified, MonitoringPost updateInvestigating, Identified, Monitoring or ResolvedResolved runs the resolve check
MonitoringAn alert joinsInvestigatingPages again
Any openAll alerts resolved, Internal, made by BeaconResolvedChat post
Any openAll alerts resolved, Unlisted or PublicNo changeChat post after 30 min
Any openResolve with unsuppressed alerts firingRefusedDialog offers a silence
Any openMerged by scope (emptied) or by handMergedmerged_into set; group keys move on a manual merge
ResolvedNew alert in its group within 30 min, Internal, made by BeaconTriggeredAcknowledgement cleared, paging restarts
ResolvedReopen by staff, within 7 daysInvestigatingNo paging until "Page on-call"

Maintenance

FromEventToSide effects
noneCreatedScheduledexcluded_from_slo set if Public and before the start; mute_slo_burn on by default
Scheduledscheduled_start, or Start nowIn ProgressScope and start lock. Alerts in scope suppressed.
ScheduledCancelCancelledNone
In Progressscheduled_end, or CompleteCompleted10-minute grace, then "Still failing after…"

Silence

FromEventToSide effects
noneCreatedActiveMatching alerts suppressed
Activeexpires_at reached, or RevokeExpired, RevokedAlerts unsuppressed, invariant runs

Escalation (on the incident)

FromEventToSide effects
NoneIncident created, resource has a parentWaitingnext_page_at = now + page_delay
None, WaitingTime reached, or no parent, or Page on-callCallingCall the first responder
CallingNo key press after "backup after"CallingNext responder; a new round after the last
CallingKey press, Acknowledge, staff actionDoneNotification Acknowledged
Calling3 rounds without an answer, severity HighDoneRed on the control panel, chat post. Critical keeps calling.
Waiting, CallingIncident merged or resolvedDoneNone
Callingpaging_pausedCallingNo call while paused; continues on resume

Registry resource

FromEventToSide effects
noneListedIts statusActive sets active_since
Pending, Suspended, TerminatedListed as ActiveActiveNew active_since, so the grace applies again
ActiveListed as SuspendedSuspendedIts alerts and its descendants' alerts resolve as "Resource removed"
AnyListed as Terminated, or missing from 2 good fetchesTerminatedSame. Row kept 90 days.
AnyThe list would uncheck over 10%, or is emptyNo changeremoval_held, chat post, admin applies
AnyFetch failsNo changeSource red after 15 min

Rule evaluation and region telemetry

ItemFromEventTo
Rule EvaluationHealthyQuery errorErroring
Rule EvaluationErroring3 errors in a rowBroken (control panel, one chat post)
Rule EvaluationErroring, BrokenA good queryHealthy
RegionOKClickHouse probe fails 2 timesUnreachable: one Critical alert, rules skipped, status Unknown
RegionOKOver 50% of hosts that Atlas synced are silent in DatumSuspect: rules run, status Unknown after 3 minutes, silent reporters left out
RegionUnreachable, Suspect2 good checksOK

Service status

FromEventTo
AnyA worse computed status for 3 minutesThat status
AnyA better computed status for 2 minutesThat status
AnyRegion Unreachable or Suspect, or no valid data, for 3 minutesUnknown (grey)
AnyPublic maintenance In Progress with this serviceMaintenance at once

17. Scenarios

Each row is an acceptance test. The game day in phase 2 runs the rows without SLOs. Phase 3 runs the rest.

ScenarioWhat happens
Leaves: the owner layer handles it
One customer site returns 500 from its own codePilot counts app_error and tells the owner. Not in the Sites SLI. No Beacon alert.
One site's bench refuses connectionsPilot counts platform_down and tells the owner. One bad reporter: at most a Low burn alert, no page.
One VM crashes and does not restartmetald counts it unavailable. The Servers SLI drops a little. One bad reporter: no page.
A customer stops their VM, or a Sleepy VM sleepsNot wanted running, so not in the Servers SLI. Its Pilot goes silent with no cause alert, so it is left out of the Sites SLI.
A Pilot release restarts every Pilot in bomPilots silent for a minute are left out. No burn, no page.
One level up: Beacon acts
A host loses power (30 VMs, 400 sites)"Host down" fires after about 6 minutes: one Critical incident with the host and descendants, one call. The Sites and Servers burns stay under the fast page. If the outage lasts 3.6 hours, the Servers 6-hour alert joins this incident.
A host's storage stalls and its VMs hangmetald counts them stuck or unavailable. "VMs unavailable on host" fires after 5 minutes over 20%: one High incident for the host.
A bad bench update breaks 3% of benches in bomNo cause rule matches. The Sites SLO burns at 30: the fast alert pages after about 30 minutes, when the 1-hour window passes 14.4. The incident has region scope.
A slow leak: 0.3% of sites fail all weekBurn rate 3. No page. After about a day the 3-day window passes 1, and a Low alert goes to chat and email.
The proxies in bom fail 20% of requestsPilot pings on loopback stay green. The Networking SLO burns at 200 and pages after about 4 minutes.
One proxy node stops being ready"Service node not ready" after 3 minutes: High incident for the node. If requests fail, the Networking burn alert joins it, because it has a firing cause alert.
Object storage gateways return 5xx for 10% of requestsThe Object Storage SLO burns at 100: the fast alert pages after about 9 minutes.
A small region: 1 VM of 100 is downThe Servers burn rate is 10, and only 1 reporter is bad: a Low alert, no page.
A second host dies an hour after the first, whose incident is acknowledgedThe group join only works within 30 minutes or while Triggered. A new incident and a new call.
Watchers fail
Atlas in bom stops (job queue dead)Host ages stop updating. "Atlas silent" fires after 5 minutes: one Critical region incident. Host-down cannot fire without data, which is correct.
Atlas's host sync job is stuck, but metald reports"Atlas cannot sync host" (High) for each host, in one incident through the group key. No Critical, no descendants.
Datum or ClickHouse in bom is downRegion Unreachable: one Critical alert. Rules skipped. bom shows grey "Status unavailable" after 3 minutes.
Datum ingest lags, ClickHouse is upHosts that Atlas syncs are silent in Datum: region Suspect. Silent reporters are left out, so no burn alert.
A slow ClickHouse makes 8 rules time outThose evaluations turn Erroring, then Broken. One chat digest. No page.
Central is downThe last server ID map stays. Rules and SLIs keep working. Only VMs created during the outage are unmatched until it returns.
Atlas's resource endpoint failsThe registry keeps its last list. The source turns red after 15 minutes. No false alerts.
A bug makes Atlas return an empty listRemovals held. Alerts keep firing. One chat post. An admin checks before applying.
Beacon's site is downThe heartbeat stops. The dead-man switch calls the on-call engineer.
Lifecycle and muting
A host is archived in AtlasTerminated after 2 fetches, or at once when listed as Terminated. Its alerts resolve as "Resource removed".
Kernel update on 3 hosts, internalInternal maintenance with the hosts and descendants, mute_slo_burn on. No pages. Public page unchanged. The downtime counts in the SLO.
Announced object storage upgrade in sinPublic maintenance with Object Storage · sin = Maintenance. Purple on the page. Reporters in scope are left out of the SLO.
Hosts still reboot when a maintenance ends10-minute grace. Only what still fails after that goes into one incident.
A host is silenced for a disk swapThe silence includes descendants, so its VMs' alerts are muted too.
Paging and incidents
Nobody answers the callBackup after 2 or 5 minutes, then a round every 15 minutes. High stops after 3 rounds and turns red. Critical keeps calling.
Someone presses 1 just after a mergeThe callback follows merged_into and acknowledges the target.
An incident in Monitoring gets a new alertIt goes back to Investigating and pages again.
Staff merge the fra incident into the bom oneThe group keys move. The next fra alert joins the bom incident while it is young.
An engineer tries to resolve while alerts fireRefused. The dialog offers a silence for the remaining alerts.
An Unlisted link is regeneratedThe old link stops working at once. The action clears its cached response.

18. Integrating a V2 service

A service team does up to three small things. Most services need only the first.

1. Report what you watch, as counts

If your service watches things below it, report how many there are and how many fail, each minute. Do not add a label for each item. A site, a VM or a request is never a label value. A host or a service node can be one, because there are few of them.

# Pilot, once a minute per VM (datum_client)
batch = Batch("pilot", "sites")                  # counts summed over every bench on the VM
for state in ("up", "app_error", "platform_down", "maintenance"):
    batch.gauge("", counts[state], ts=when, state=state)      # -> pilot_sites{state}, one ts

Go services expose Prometheus /metrics on localhost. A service that only writes an access log can turn it into counters with Vector's log_to_metric, as the proxy does. The Vector on the node scrapes it and sends it with remote write to /v1/ingest/remote. Use one Datum sink per machine, because Datum allows 12 requests a minute per token.

# /etc/vector/conf.d/http-proxy.toml
[sources.http_proxy]
type = "prometheus_scrape"
endpoints = ["http://127.0.0.1:9180/metrics"]
scrape_interval_secs = 15
# add "http_proxy" to the inputs of the node's existing Datum sink

2. If customers use it, define an SLI

Add beacon/services/<name>.sql. It returns one row per reporter seen in the last 30 minutes: resource_id, good, valid, last_ts. The header sets the title, scope and slo_target. Count only failures that the platform causes.

3. Add a cause rule only if it points to one fix

Add beacon/rules/<name>.sql. A family of checks is one rule, with the check name as alert_key. It returns only failing rows: resource_id, alert_key, value, detail. Do not add a rule for a single leaf that your own layer already handles. Use the views that Datum provides, so that counters and freshness are right:

ViewReturns
counter_increase(metric, window)resource_id, labels, increase, with counter resets handled for each series
latest_value(metric, window)resource_id, labels, value, ts, the newest sample in the window
CREATE VIEW datum.counter_increase AS          -- parameterized view, shipped by Datum
SELECT resource_id, labels, length(vals) AS samples,
       arraySum(arrayMap((d, v) -> if(d >= 0, d, v), arrayDifference(vals), vals)) AS increase
FROM (
  SELECT resource_id, labels, arrayMap(x -> x.2, arraySort(groupArray((ts, value)))) AS vals
  FROM datum.samples_recent
  WHERE metric = {metric:String} AND ts > now() - toIntervalSecond({window:UInt32})
  GROUP BY resource_id, labels
);
-- A drop means a reset: the new value is growth. Tested in clickhouse local 26.10.

Where the files live

In v1, rules and SLIs live in Beacon's repository. A team opens a pull request there. Beacon loads the files on bench migrate, and a loaded rule is read-only in Desk except enabled. The Test button on the Alert Rule and Service forms runs a query in every region and checks the contract. Sync from each team's own repository can come later, when more teams write rules.

19. REST API

Desk forms call whitelisted methods on their DocType with frm.call. Internal scripts call the same methods through native Frappe document routes. There is no custom internal /api/beacon/ action layer.

Method and pathAuthPurpose
POST /api/v2/document/Beacon%20Incident/{name}/method/acknowledgeResponderThe same acknowledgement guard as Desk.
POST /api/v2/document/Beacon%20Incident/{name}/method/resolveResponderRefuses resolution while unsuppressed alerts fire.
POST /api/v2/document/{encoded DocType}/{name}/method/{method}Authorized staffOther internal document actions. Each controller owns its permission and state checks.
GET /api/beacon/resourcesSource tokenExternal Resource Source contract that Beacon reads; this is not an internal Beacon action route.
GET /api/beacon/telemetry-idsSource tokenExternal telemetry mapping contract that Beacon reads.
POST /api/method/beacon.api.twilio.voiceTwilio signatureReturns the call prompt and Gather response.
POST /api/method/beacon.api.twilio.gatherTwilio signatureDigit 1 acknowledges the incident.
POST /api/method/beacon.api.twilio.statusTwilio signatureUpdates notification delivery status.

The public Vue app at / calls guest methods under /api/method/beacon.api.status.: get_status, get_history, get_incident and get_unlisted_incident. Only published data is returned. Cached results last 60 seconds. Publication and public changes clear the affected cache keys.

The current review identifies gaps in impact preservation, side-effect-free read helpers and public freshness. These are proposed corrections, not new action routes.

Customer rules and the Central event outbox remain outside the first version.

20. Status page

The mockups are in moki, project beacon-status, version 4. They have three layouts for the main page, a public incident page, an unlisted incident page and a history page. The ideas come from DigitalOcean (regions as rows), Railway and Cloudflare (90-day bars), Fly.io (region grid) and Hetzner (unlisted incident links).

21. Desk control panel and roles

Design intent. The implemented dashboard currently has six counts, two Quick Lists and shortcuts. The operational banners and evidence described below are proposed work. See the reviewed hierarchy.

The Beacon workspace is the control panel. From top to bottom:

Working an incident: Acknowledge → Post update → Publish (if customers need to know) → Resolve → write the RCA. The DocType reference lists every button and when it shows.

RoleCan
Beacon ResponderAcknowledge, update, publish and resolve incidents. Create maintenance and silences. See private links. Set the primary override.
Beacon AdminEverything above. Also rules, services and SLOs, regions, resource sources, monitoring on resources, the responder list, channels and paging pause.

The Beacon site's system time zone is UTC. Forms show UTC next to time fields.

22. Changes in Datum and other services

Datum

We reviewed frappe/datum for the expected load. We checked each finding in the code. Datum stamps each sample with the resource_id of the token (routes/v1/ingest.py), which is why sites report through Pilot's counts.

#Finding (verified)Change
1 P1Each request is one ClickHouse insert, without async_insert (providers/clickhouse.py). Many small parts make merges fall behind.Insert with async_insert=1, wait_for_async_insert=1.
2 P1samples is ordered by (resource_id, metric, ts). Beacon asks for "metric X, all resources, last minutes".Add samples_recent: ORDER BY (metric, ts, resource_id), daily partitions, TTL 2 days, filled by a materialized view. Add the views counter_increase and latest_value.
3 P1The insights reader can create and drop views and has no limits.Add a read-only beacon user: max_execution_time=20, memory and thread limits, 4 concurrent queries.
4 P2samples and logs have no TTL.Set a budget, for example 30–45 days of samples and 14–30 days of logs. Beacon keeps its own daily SLO counts, so no long rollup is needed for it.
5 P2A write that ClickHouse refuses under load returns 400 (not retryable).Return 503 for overload errors. Align the client and server timeouts.
6 P2Sample timestamps are not bounded.Reject samples more than 5 min in the future or more than 2 days old.
7 P2datum_client logs "unreachable" only at debug level.Log it as a warning, rate-limited.

Other services

ServiceChangeSize
PilotThe uptime monitor already pings every site. Each minute, ship pilot_sites{state} through the existing MetricShipper, summed over the VM's benches, all four states with one timestamp. Classify each failed ping with the table in "Who watches what".Small
AtlasServe GET /api/beacon/resources: hosts, VMs and service nodes with parent and status, and the ETag. Ship atlas_host_sync_age_seconds for every Running host: today latest_usages() drops hosts with no sync in the last hour.Small
CentralKeep minting Pilot's Datum token with the server ID (central/api/pilot.py), so Central's metrics keep working. Serve GET /api/beacon/telemetry-ids: server ID, region and Atlas VM ID for every server, with an ETag. Central already stores this (atlas_vm_id).Small
MetalNone. metald already ships metal_vm_wanted_running, metal_vm_unavailable{reason} and metal_build_info.None
HTTP proxyVector log_to_metric on the existing JSON access log: proxy_requests_total{class}. No proxy code change.Config, phase 3
Storage gateway, CentralRequest counters by status class, for their SLIs.Small, phase 3 and 4

23. Scale numbers

LoadPer regionAll regions
Registry poll (every minute, with ETag)1 request, mostly 304. About 10,000 rows when it changes.10 requests/min
Cause rule queries (about 10 rules; check families every 5 minutes)about 6/minabout 60/min
SLI queries (4 services)4/min, a 30-minute scan, about 5,000 rows out40/min
Service Minute writesAbout 40 rows a minute in one bulk insert
Alerts in a host failure1 or 2 rows. Sites never become alert rows.
Status pageEach API response is computed at most once a minute. Readers get the Redis copy.

4 RQ workers on the beacon queue are enough. Most queries take 0.1–2 s on samples_recent.

24. Rollout and checks

PhaseScopeDone when
0. InputsDatum changes 1–3. Pilot ships pilot_sites. Atlas serves the resource list and reports an age for every Running host. Central serves the server ID map.A sample rule runs in under 2 s. Every VM in one region reports pilot_sites, and Beacon matches it through telemetry_id.
1. Rules and incidents, chat onlyRegion, Resource Source, Resource, Alert Rule, Rule Evaluation, Alert, Silence, Incident, chat posts. Port the checks in alerts.py as rule families.2 weeks next to the Insights alerts: every real Insights post has a Beacon alert, with no duplicate episodes.
2. PagingEscalation, Twilio, email, maintenance, roles, the control panel.The scenario rows without SLOs pass on a game day.
3. SLOs and status pageProxy counters, Services, SLIs, burn alerts, Service Minute and Day, the SLO report, Publish, unlisted links, the status page app.One month in which burn alerts match real incidents and the page matches the incidents. Then turn off the Insights alerts.
4. CentralOutbox, affected sites, customer rules.Central shows unlisted incidents to the affected teams only.

25. What we do not build

26. Open questions

27. Sources