Probe fleet and the private agent
How checks run across regions and pools, how to register a private monitor-worker inside your network with a registration token, the agent lifecycle — and what assignment does and does not do today.
Checks are executed by monitor-worker processes. The hosted fleet runs in the regions you can pick on a monitor — us-east, us-central, us-west, eu, au, asia, me — and the same worker image can be run inside your own network as a private agent that registers with the platform and heartbeats from there.
Regions and execution
In the current build a monitor is executed from one region: the first entry of
region_codes. The full list is stored, and per-region execution and comparison is what the platform is moving to; until then, treat region_codes[0] as the probe location.Run a private agent
- 1In the admin console, Infrastructure → Agents → Registration tokens, generate a token. Tokens are prefixed
ptreg_, valid for 15 minutes by default (up to 24 h) and single-use by default (up to 100 uses). - 2Start a monitor-worker with the token and a writable credential path. The worker POSTs to
/api/v1/agents/registerwith the token, receives a permanentpt_agent_…credential, writes it toAGENT_CREDENTIAL_PATHand never needs the token again. - 3The agent appears under Unauthorized agents with status
pending. An admin authorises it by assigning a region (required) and a pool (optional). - 4From then on it heartbeats every 30 seconds; it is marked degraded after 90 s without a heartbeat and offline after 300 s. Lifecycle:
pending→active→disabled/revoked.
docker-compose.ymlyaml
monitor-worker:
build: ./services/monitor-worker # same image as the hosted fleet
environment:
AGENT_REGISTRATION_TOKEN: ptreg_… # single-use; ignored once redeemed
AGENT_CREDENTIAL_PATH: /data/agent-credential.json
ADMIN_SERVICE_URL: https://<admin console host>
volumes:
- ./data/monitor-worker:/data # must be writable by uid 1000
cap_add: ["NET_RAW"] # only if the agent runs ICMP checksThe worker runs as a non-root user; only the credential file is written, and only when a registration token is set. ICMP needs CAP_NET_RAW as a file capability, not root.
What assignment does today
Regions and pools are fleet inventory in the admin console: they say where an agent is and let you see its health. A monitor is not yet routed to a specific private agent or pool — there is no
agent_id or pool_id on a monitor. Reaching internal targets through a private agent is the intended use and is what this feature is being built toward; until routing ships, the agent's region assignment is informational.Environment reference
| Variable | Purpose |
|---|---|
AGENT_REGISTRATION_TOKEN | Blank = plain worker with no fleet registration. |
AGENT_CREDENTIAL_PATH | Default /data/agent-credential.json. |
ADMIN_SERVICE_URL | Where to register and heartbeat. |
DATABASE_URL, NATS_URL, VICTORIAMETRICS_URL | Platform connections for a self-hosted worker. |
SMTP_*, APP_BASE_URL, AUTH_SERVICE_URL, INTERNAL_API_KEY, MINIO_* | Mail, links, internal auth and snapshot storage. |