Developers

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

  1. 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).
  2. 2Start a monitor-worker with the token and a writable credential path. The worker POSTs to /api/v1/agents/register with the token, receives a permanent pt_agent_… credential, writes it to AGENT_CREDENTIAL_PATH and never needs the token again.
  3. 3The agent appears under Unauthorized agents with status pending. An admin authorises it by assigning a region (required) and a pool (optional).
  4. 4From then on it heartbeats every 30 seconds; it is marked degraded after 90 s without a heartbeat and offline after 300 s. Lifecycle: pendingactivedisabled / 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 checks

The 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

VariablePurpose
AGENT_REGISTRATION_TOKENBlank = plain worker with no fleet registration.
AGENT_CREDENTIAL_PATHDefault /data/agent-credential.json.
ADMIN_SERVICE_URLWhere to register and heartbeat.
DATABASE_URL, NATS_URL, VICTORIAMETRICS_URLPlatform connections for a self-hosted worker.
SMTP_*, APP_BASE_URL, AUTH_SERVICE_URL, INTERNAL_API_KEY, MINIO_*Mail, links, internal auth and snapshot storage.

Try it on your own endpoints.

Ten monitors, one region and a status page are free — no card.

Start free