Beacon telemetry rollout
How to move the Frappe Cloud V2 regions that run now to the Beacon telemetry contract. This plan gives the order, the steps, a check for each step, the rollback, and the gaps to close first.
Context
Five pull requests change how each product sends telemetry to Datum, the telemetry service of each region. Beacon reads that data from ClickHouse and sends the alerts. Each product keeps its Beacon rules in its own beacon/ folder.
The regions already run Datum, Atlas, Cargo, object storage clusters, Central and Pilot. So the rollout must change machines that run now, with data that exists now. Two changes make the order strict:
- The token issuer changes. Cargo now signs the Datum tokens of its own services with its own key. Before, Central gave these tokens through a route that the Central pull request removes. So each Cargo machine must get the new Cargo token before Central removes the old route.
- Beacon comes later. The products change first. Beacon is deployed in a later phase, so until then the Insights alerts are the only alerts. Keep them.
- The Datum schema changes. Migration
006_beacon.sqladds the Beacon tables, views and user, and it changes how long ClickHouse keeps old rows. It runs when Cargo sets up the Datum host again.
| Pull request | Base | State on 14 November 2026 | Rollout effect |
|---|---|---|---|
| frappe/datum#20 | main | Open. CI passes. | New schema, the Datum agent, the Cargo issuer, the beacon ClickHouse user |
| frappe/cargo#141 | develop | Open. CI fails until Datum #20 is on main. | Cargo key, machine tokens, new agent on Cargo machines, Datum host points at the Cargo key set |
| frappe/atlas#607 | develop | Open. CI fails until Datum #20 is on main. | New agent on hosts and service VMs, new metald series, the resource list for Beacon |
| frappe/pilot#828 | develop | Open. | Pilot sends only what Beacon reads. Fluent Bit is removed from the code. |
| frappe/central#714 | develop | Open. The test fix is pushed. | Central errors and gauges to Datum. Removes the Cargo token route. |
Gaps to close first
I read the setup code of each product to see what a second setup run does on a machine that runs now. Three gaps make the rollout text in the pull requests wrong or incomplete. Close them before step 1.
Blocker Object storage setup skips the healthy nodes
The pull request says: run setup again on each object storage cluster, so each machine gets a Cargo machine token. But ObjectStorageCluster._setup sets up only the machines that are not healthy Garage nodes (discover_machines_to_setup). The agent and the token timer install in start_setup_on_machine, so a healthy node gets neither.
Effect: every node of an Active cluster keeps the old agent and the old timer. The old timer calls the Central route. When Central #714 removes that route, the nodes cannot renew their token, and their telemetry stops when the token expires.
Recommendation: in _setup, call install_metrics_exporter for every Running machine, also the healthy ones. The method is safe to repeat, and the Datum Server setup already works this way. Add a test in Cargo.
Decision Migration 006 deletes old rows on its first run
006_beacon.sql runs ALTER TABLE ... MODIFY TTL on samples and logs. Before, these tables had no TTL. ClickHouse applies a new TTL to the existing parts by default, so the first run deletes:
system_*samples that are older than 15 days- other samples that are older than 90 days
- log lines that are older than 30 days
samples_5m is filled by a materialized view, which sees only new rows. So after the migration, a chart of a machine metric has no data older than 15 days. The TTL also starts a mutation that rewrites the parts of both tables. On a large table this takes much disk I/O.
Recommendation: in 006_beacon.sql, copy the system_* rows of the last 90 days into samples_5m on the first run, before the TTL change. Use the same guard as the samples_recent copy. Before the rollout, read the size of both tables in each region, and run step 2 at a time of low traffic. If the old history has no use, accept the loss and only plan for the I/O.
Gap Fluent Bit stays on the Pilot servers
Pilot #828 removes Fluent Bit and pilot remove logs from the code. On a server where pilot setup telemetry ran, the user service pilot-fluent-bit.service continues to run after the Pilot update. Nothing stops or removes it, and it continues to send log lines in the old format.
Also, [telemetry] now reads only enabled, which is true by default. A server with metrics_enabled = false starts to send telemetry after the update.
Recommendation: make the Pilot update stop and remove pilot-fluent-bit.service and its files one time. Read metrics_enabled as enabled when enabled is not set.
Order
Steps
Do each step in every region before you go to the next step, except where the step says otherwise.
0. Close the gaps and get the code ready
Code. No change on a machine.
- Fix the three gaps above in Cargo #141, Datum #20 and Pilot #828.
- In each region, read the size of
datum.samplesanddatum.logswith the ClickHousedefaultuser on the Datum host:SELECT table, formatReadableSize(sum(bytes_on_disk)) AS size, sum(rows) AS rows FROM system.parts WHERE database = 'datum' AND active AND table IN ('samples', 'logs') GROUP BY table; - Get a review of all five pull requests.
Check: CI of Datum #20 passes. The other four wait for step 1.
1. Merge Datum to main
GitHub. No change on a machine.
Cargo and Atlas install Datum and the Datum agent from main. A Datum host changes only when Cargo sets it up or updates it, so this merge changes nothing in a region.
Check: run CI again on Cargo #141 and Atlas #607. Both pass. Then merge Cargo, Atlas and Pilot to develop. Do not merge Central yet.
2. Deploy Cargo, then set up each Datum Server again
Each region. Do the two parts in one session, one region at a time.
- Deploy Cargo. The patch
cargo.patches.create_signing_keymakes the Cargo Ed25519 key. From now, Cargo signs the token of the Cargo site with this key. - On the Datum Server, select Set Up Again. The save fills the new
beacon_user_password. Setup then installs Datum frommain, writesDATUM_JWKS_URLas the Cargo key set, runsdatum-migratewith migration 006, installs the Datum agent with a Cargo machine token, and installs thedatum-refresh.timer.
Gap in data: between the two parts, the Datum host still reads the Atlas key set, so it refuses the new Cargo-signed token of the Cargo site. Setup also restarts ClickHouse, so all senders of the region fail for about one minute. Vector keeps the data of the agents in its buffer, but the Pilot and product gauges of that minute are lost.
Check:
- The Datum Server is Active, and the Setup Log shows no error.
https://telemetry-svc.<wildcard domain>/healthreturns 200.- With the
beaconuser:SELECT count() FROM datum.samples_recent WHERE ts > now() - INTERVAL 5 MINUTEis more than 0. - Rows arrive with
resource_id = 'cargo'again. - On the Datum host,
systemctl list-timers datum-refresh.timershows the timer. - Datum logs no
request refusedline with status 401 after the setup.
3. Set up each object storage cluster again
Each region, each cluster. Needs the blocker fix.
Select Set Up Again on the Object Storage Cluster. With the fix, each Running node gets a Cargo machine token in its Atlas metadata, the datum-refresh.timer that calls cargo.api.telemetry.datum_token each day, and the new agent with the Garage, gateway nginx and ClickHouse role files. Setup also applies Caddy on the gateway again.
Check:
- The cluster is Active.
- Each node sends
system_boot_time_secondsunder its Atlas Virtual Machine name. garage_cluster_availablearrives from the gateway and storage nodes.- On one node, run the timer one time:
systemctl start datum-refresh.service. It writes a new token, and the agent continues to send.
4. Deploy Atlas and release Pilot
Each region for Atlas. All Pilot servers for Pilot. The two can go at the same time.
Atlas: deploy Atlas. The daily jobs renew_telemetry_credentials and renew_service_telemetry_credentials install the new agent on each host, each service VM and the Cargo VM. To do it now, select Configure Telemetry on each Metal Server, and queue the telemetry setup of each service node. Then upgrade metald on each host, so the hosts send the new, smaller set of series. The old /etc/vector/vector.yaml stays on the machine, but the new unit does not read it.
Pilot: release Pilot through the normal Pilot update. A Pilot sends under its server name until it gets a new token from Central. The token gives the Atlas Virtual Machine name only after step 5.
Check:
atlas_machinearrives each minute fromatlas.- Each host sends logs with product
metal, and metald sends fewer series than before. datum_agent_dropped_events_totalarrives from each machine with the new agent.- Pilot servers send
pilot_infoandpilot_sites. - No
pilot-fluent-bit.serviceruns on an updated Pilot server.
5. Deploy Central
Global. Only when steps 2 and 3 are done in every region.
- Make sure that no Cargo machine still calls the old route. Every Datum host and every object storage node must have the new
datum-refresh.timer. - Deploy Central. The migration adds new indexes. Read the size of the tables first, and deploy at a time of low traffic.
- Set Central Telemetry Region on one Region. Until then, Central sends nothing.
Central sends its data to Datum now, also when Beacon is not deployed. Datum keeps it, so Beacon can read it later.
Check: rows arrive with resource_id = 'central'. A Pilot that renews its token sends under its Atlas Virtual Machine name.
Later: the Beacon phase
Steps 0 to 5 are complete without Beacon. The products send the contract data, and Datum keeps it. Do steps 6 and 7 when Beacon is deployed. Nothing in steps 0 to 5 waits for them.
Until step 7 ends, the Insights alerts on each Insights site continue to page. Atlas #607 removes only the script that made them. The records stay until you delete them. Their metric names still appear in the new code, but I did not check every label and query, so look at each Insights alert one time after step 4.
6. Deploy and configure Beacon, and sync
Beacon. After steps 0 to 5 in every region.
- Deploy Beacon. Before the first sync, turn on Paging Paused in Beacon Settings. The first syncs make many alerts, and nobody must be paged for them.
- For each region, make or update the Beacon Region. Set URL to the read endpoint of ClickHouse, Database to
datum, User tobeacon, and Password to the beacon password of the Datum Server. Get the password with Show Password on the Datum Server. Set the Wildcard Domain. - Add the Atlas resource list of each region as a Beacon Resource Source.
- In Beacon Settings, set Central URL and the GitHub Token.
- Add frappe/atlas, frappe/cargo, frappe/central and frappe/pilot as Definition Sources, with branch
developand folderbeacon. Select Sync Definitions. - Set the Query Region of the Dashboard and API and the Server actions services, and the Regions of the 3 Central checks, to the Region that has Central Telemetry Region set. Then turn the checks on.
Check: the sync applies every source. No rule is Broken. Each Beacon Region shows Hosts Reporting near 100%.
7. Watch, then turn paging on
Beacon. One day or more.
Read each Firing alert. Each alert must be a real problem, or a rule to fix. Fix the noisy rules in the repository of their product, then sync again. When the alerts are correct, turn off Paging Paused. Then do the cleanup below.
Rollback
| Step | How to go back | Limit |
|---|---|---|
| 2. Cargo and Datum | Run Update Datum with the old commit. Datum ignores the new tables and views. | The migration cannot be reversed. Deleted rows do not come back. Do not deploy an older Cargo after this step: the Datum host reads the Cargo key set, and an older Cargo does not serve it, so Datum refuses every token. Instead, set DATUM_JWKS_URL back to the Atlas key set first. |
| 3. Object storage | None needed. The old agent configuration is replaced, and the new one is safe to install again. | The old timer is replaced on each node. |
| 4. Atlas and Pilot | Deploy the previous version. The next daily renewal installs the old agent again. | A Pilot server without Fluent Bit stays without it. |
| 5. Central | Deploy the previous version. The old route comes back. | The new indexes stay. They do no harm. |
| 6. Beacon | Turn on Paging Paused, or remove a Definition Source. | None. |
Cleanup
Do the first item only after step 7, when Beacon pages. Before that, the Insights alerts are the only alerts.
- On each Insights site, delete the old Insights Alert records by hand.
- In Insights, delete the six Cargo charts that have no data.
- When all is stable, remove
/etc/vector/vector.yamlfrom the machines. The new agent does not read it.
Done when
- Every Datum host, object storage node, host, service VM and Pilot server sends under its Beacon resource ID.
- No Cargo machine calls the Central route, and the route is gone.
- Datum logs no 401 lines from a known sender.
- Products phase: the items above are true. The Insights alerts still page.
- Beacon phase: Beacon has no Broken rule, and paging is on.
- The old Insights alerts and charts are deleted.
Sources
- frappe/datum#20:
datum/migrations/006_beacon.sql,datum_client/agent/install.sh - frappe/cargo#141:
cargo/telemetry/doctype/datum_server/datum_server.py,cargo/object_storage/doctype/object_storage_cluster/object_storage_cluster.py,cargo/telemetry/conf/datum/install.sh,cargo/issuer.py - frappe/atlas#607:
atlas/atlas/core/telemetry/agent.py,atlas/service/core/telemetry.py,atlas/metal_server/core/host_installation.py - frappe/pilot#828:
pilot/config/telemetry.py,pilot/commands/setup/telemetry.py - frappe/central#714: the pull request description
- frappe/beacon:
docs/integration.md