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.

Plan written on 14 November 2026. Updated the same day: Beacon is deployed later, in a separate phase. Nothing is deployed yet. Related page: Beacon telemetry map.

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:

Pull requestBaseState on 14 November 2026Rollout effect
frappe/datum#20mainOpen. CI passes.New schema, the Datum agent, the Cargo issuer, the beacon ClickHouse user
frappe/cargo#141developOpen. 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#607developOpen. 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#828developOpen.Pilot sends only what Beacon reads. Fluent Bit is removed from the code.
frappe/central#714developOpen. 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:

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

Each arrow means "must be done before". Atlas and Pilot can go at the same time. Central goes last of the products, because it removes the old token route.

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.

  1. Fix the three gaps above in Cargo #141, Datum #20 and Pilot #828.
  2. In each region, read the size of datum.samples and datum.logs with the ClickHouse default user 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;
  3. 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.

  1. Deploy Cargo. The patch cargo.patches.create_signing_key makes the Cargo Ed25519 key. From now, Cargo signs the token of the Cargo site with this key.
  2. On the Datum Server, select Set Up Again. The save fills the new beacon_user_password. Setup then installs Datum from main, writes DATUM_JWKS_URL as the Cargo key set, runs datum-migrate with migration 006, installs the Datum agent with a Cargo machine token, and installs the datum-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:

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:

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:

5. Deploy Central

Global. Only when steps 2 and 3 are done in every region.

  1. 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.
  2. Deploy Central. The migration adds new indexes. Read the size of the tables first, and deploy at a time of low traffic.
  3. 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.

  1. 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.
  2. For each region, make or update the Beacon Region. Set URL to the read endpoint of ClickHouse, Database to datum, User to beacon, and Password to the beacon password of the Datum Server. Get the password with Show Password on the Datum Server. Set the Wildcard Domain.
  3. Add the Atlas resource list of each region as a Beacon Resource Source.
  4. In Beacon Settings, set Central URL and the GitHub Token.
  5. Add frappe/atlas, frappe/cargo, frappe/central and frappe/pilot as Definition Sources, with branch develop and folder beacon. Select Sync Definitions.
  6. 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

StepHow to go backLimit
2. Cargo and DatumRun 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 storageNone 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 PilotDeploy the previous version. The next daily renewal installs the old agent again.A Pilot server without Fluent Bit stays without it.
5. CentralDeploy the previous version. The old route comes back.The new indexes stay. They do no harm.
6. BeaconTurn 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.

Done when

Sources