Making robot apps observable, and alerting on what matters
Install the agent for health, ROS, logs and models with no code. Then add pf run, a pf health check with a TTL, a few metrics, events, spans and app logs. Alert on symptoms with one-sentence rules, prefer learned baselines and peers to fixed thresholds, and preview each rule on the last 7 days.
Start with what the agent sees on its own
Install the agent from Fleet › Add machine with the one-line command the dashboard shows. The machine comes online within about 10 seconds, uses about 2 % of one core and 33 MB of memory on a Raspberry Pi 4, and starts describing itself with no code:
- Machine map: board, OS, storage health and wear, USB devices, serial adapters, cameras, I2C, GPIO, network, listening ports, services, containers and packages.
- Metrics: CPU, memory, disk, temperature, power and throttling, per-app CPU and memory, every hwmon and IIO sensor, and NVIDIA and Jetson GPUs.
- Logs from journald, Docker, syslog files and ROS /rosout (warnings and above), masked on the machine and folded into patterns.
- Events: USB changes, crashes, out-of-memory kills, service and container failures.
- Change timeline: packages, configuration files (paths only), containers, hardware, kernel and reboots, including changes made while the agent was off.
- ROS 1 and ROS 2, as a read-only observer: nodes, topics with rate and bandwidth, services, actions and diagnostics. Zenoh, Dora-rs, LCM, eCAL and plain DDS get the same picture. rmw_zenoh and SROS2-encrypted systems are not observed yet; the rest of those machines still is. See ROS 2 best practices.
- Models: which processes run ML, what kind, which framework and checkpoint. See robot policies.
Every problem becomes an issue with a probable cause, the evidence and what to do, for example "the power supply is too weak: the CPU is throttled". Issues set the machine's health (healthy, needs attention, critical or offline), and close only after the problem stays gone for 5 minutes, so a value hovering at its threshold doesn't open and close all day.
Look at what you already have before you add code. Many of the gaps teams fill with custom metrics are already covered.
Check: run pf status on the machine for its connection, identity and data levels, then open its page: Overview, Models, ROS, Hardware, Logs and Files should all have data within a few minutes.
Name every app and give it a heartbeat
The agent sees a process from outside. Only your app knows whether it is doing its job. Two habits close most of that gap.
Start every long-running app through pf run with a stable name. You get start, exit codes, crash signals and uncaught exceptions for any program, and for Python, model tracing and process health. The same name on every robot groups the app across the fleet.
Then report health from the loop that does the work, with a TTL. If the loop hangs and stops refreshing the check, it turns stale on its own, which is the most reliable "is it really working?" signal there is:
pf run --name picker -- python3 my_robot_app.py
pf health set ok "vision pipeline running" --check vision --ttl 2m
pf health set warning "camera reconnecting" --check vision --ttl 2m
pf health set critical "gripper not responding" --check gripper
pf health clear vision
pf health # the machine's overall health; exits 3 when criticalFrom Python, refresh the check on a timer rather than on every iteration:
import subprocess, time
last = 0.0
while running:
do_work()
if time.monotonic() - last > 30:
subprocess.run(["pf", "health", "set", "ok", "picking", "--check", "picker", "--ttl", "2m"], check=False)
last = time.monotonic()pf needs root or the physicalfleet group (sudo usermod -aG physicalfleet $USER, then log in again). It talks only to the local agent, so it works offline.
Check: your checks show on the machine page next to everything the agent measures. Stop the app on a test robot, and the check should turn stale once its TTL runs out.
Send a few metrics you can alert on
pf.metric is for numbers only your code knows: grasp force, parts per minute, a queue depth. Each one becomes a chart, a parameter and an alert condition, so a few good ones beat many.import physicalfleet as pf
pf.metric("gripper.force_n", 21.5, gripper="left")
pf.metric("vision.parts_per_min", 42)
pf.metric("feeder.queue_depth", len(queue), station="B3")- Metrics are stored as
app.<name>(for exampleapp.gripper.force_n), with your labels plus service. - They are aggregated on the machine per minute (min, max, sum and count) and shown as the mean per minute.
- Up to 7 labels of your own. NaN and infinite values are dropped.
- Name a metric by what it measures, with its unit at the end. The rule builder reads the name and unit from it, so
app.gripper_temp_cshows as "Gripper temp" in °C. - Use labels for what you filter by (
gripper="left",bin="B3"), never for values that change every call, such as ids or timestamps.
Check: the metric appears on the machine's Hardware › Metrics under Apps' own metrics, and in the rule builder under Your app (SDK) with the number of machines reporting it.
Record events and trace the slow paths
Events are things that happened: a jam, a failed grasp, a calibration. They land on the machine's timeline next to everything the agent records.
pf.event("task.failed", "cup not found", severity="warning", task="pick", bin="B3")
pf.event("qa.jam", "feeder jammed", severity="error") # stored as app.qa.jam- Severity is debug, info (the default), warning, error or critical.
- Kinds starting with app., task., episode., policy., model., perception., planner., arm., rl., serve., shadow. or dream. are kept as sent. Anything else gets app. in front, so qa.jam is stored as app.qa.jam.
- Up to 20 events a second per machine, with bursts of 200, so a runaway loop can't flood the fleet.
- Attribute values are masked for secrets on the machine.
Spans time steps. Nested spans form a trace, shown as a waterfall:
with pf.span("pick", item="cup") as s:
with pf.span("plan_grasp", objects=3):
plan = planner(scene)
with pf.span("execute", kind="client"):
ok = arm.execute(plan)
s.set(success=ok)
@pf.trace
def plan_grasp(scene): ...
@pf.trace("vision.detect", camera="wrist")
async def detect(frame): ...An exception marks the span as an error and is re-raised unchanged. Async functions are timed around the awaited work, and a thread started inside a span continues its trace. Spans are sampled by the machine's bandwidth level (30, 300 or 1,200 a minute at Low, Normal and High, all of them at Very high), and error spans are always sent. To follow a call onto an inference server, pass pf.trace_headers(); see robot policies.
Apps in C++, Rust, Go or any other language can send metrics, events, spans and logs as JSON over UDP to the agent on the same machine. It is fire-and-forget and never blocks, and the agent accepts it only on the loopback interface. The record format is in the docs in the dashboard.
Check: Observability › Software › Models › Traces lists each operation with calls, p50, p95, max and errors. Pick one, then a slow call, to see its waterfall.
Bring in your app's own logs
System logs arrive with no setup. Your app's own logs, with the logger, the code location and the trace, come in one of two ways. Pick one per app.
| Way | Code changes | Best for |
|---|---|---|
| Log files, set up in the dashboard | None | Apps that already write log files |
| The Python library | One line | Fields, levels, chosen loggers and trace ids |
/var/log/picker/*.log, and choose the machines (every machine, a group or tags). JSON lines are read as fields (message, level, logger and up to 12 more), and multi-line stack traces from Python, Java and Go are joined into one entry. New files matching a glob are picked up within 30 seconds. An organization can collect up to 50 apps.import logging
import physicalfleet as pf
pf.capture_logs() # every logging record, INFO and up
log = logging.getLogger("picker.grasp")
log.warning("slip detected", extra={"cup": 3}) # cup arrives as a field
try:
grasp()
except Exception:
log.exception("grasp failed") # the traceback stays with the line
pf.log("calibration done", severity="info", offset_mm=0.4) # one line, without logging
# or, instead of capture_logs(), send only some loggers
logging.getLogger("picker").addHandler(pf.LogHandler())Each line carries the severity, logger, file and line, function, thread, your extra fields, the traceback, and the trace id of the span it was written in, so a log line opens its trace. Fields named like secrets are sent as ***, sensitive paths such as /etc/shadow, .ssh, *.key and *.env are refused, and all logs are masked on the machine before they are sent.
Don't collect the same lines twice. If the app's output already goes to journald or Docker, those lines arrive anyway: use either that or the library for an app, not both.
Check: Debugging › Logs › Apps › My Apps lists the app with its lines, errors and warnings. In Debugging › Logs › System, switch Lines to Patterns to see repeated messages folded with a count, so the rare line stands out.
Write alert rules on symptoms
An alert should mean someone has to act. Alert on what people care about (task success, cycle time, a model not doing well, a topic that stopped) more than on causes such as CPU, which issues and insights already explain.
A rule is one sentence, built in Observability › Alerts › Rules › New rule by owners and admins: When [machines] has [condition] for [time], raise a [warning or critical] and tell [channels]. Machines are groups, locations, types, tags or picked machines, with exclusions. Empty means every machine, now and later.
| Condition | Meaning |
|---|---|
| above / below | Past a value you choose |
| outside its normal range | Away from the machine's learned normal for this hour |
| unusual next to similar machines | Different from the other machines in scope |
| changing fast | Rises or falls by a share within a window |
| stopping | Was reporting and went quiet |
| happens | An event happens a number of times in a window |
| is logged | A log line containing some text, a number of times in a window |
| goes offline | The machine stops talking to PhysicalFleet |
| is reported | PhysicalFleet found the problem itself: model, ROS, service, app or security |
Conditions can watch about 110 measurements, with the ones your fleet actually reports listed first, plus any metric your machines send (your SDK metrics are under Your app (SDK)) and any event kind. Join conditions with and or or. A warning respects quiet hours; a critical is sent even during them.
Options make rules quieter and more useful: only when at least N machines or N % match (one alert for a site-wide problem, not fifty), recover at a different value, remind while it keeps firing, escalate to critical after a while, only during certain hours, and a message with a runbook link that says what to do.
Start from Suggested for your fleet: rules proposed from what your machines report, such as machine offline, a ROS topic stopped, inference slower than usual, a service crash-looping, a motor running hot, weak Wi-Fi, an error-log spike or a security event. Press Turn on, or Adjust first. Then write your own, for example:
- When any machine in Line 2 has inference time outside its normal range for 10 min, raise a warning and tell #robot-ops.
- When any machine in factory-a has a model problem reported for 5 min, raise a warning and tell #robot-ops.
- When at least 3 machines in warehouse-1 go offline for 5 min, raise a critical and tell the on-call channel.
- When any machine has task.failed happen 5 times in 10 min, raise a warning and tell #line-3.
Check: read each rule back as a sentence. If someone on call couldn't act on it from its message and runbook link alone, rewrite it.
Use baselines and peers instead of fixed thresholds
A fixed threshold fits a temperature limit. It doesn't fit a camera rate that is lower on the night shift, or an inference time that is normal on one board and slow on another. PhysicalFleet learns both kinds of normal.
The same engine powers Debugging › Investigate › Insights, computed every 15 minutes: Off its usual, Unlike its peers ("inference time 937 ms vs 249 ms on its 10 peers"), Different setup, Something missing, Chain of causes, Version effect, Release and Policy server. Chains use only known cause-and-effect links, such as heat throttling a CPU, never arbitrary correlations.
Keep fixed thresholds for physical limits: disk, memory, temperatures and voltages.
Check: preview an outside-its-normal-range rule before saving it. If it would have fired every day for the last week, lower the sensitivity or lengthen the time.
Preview every rule, and know where it runs
Beside the sentence, a live preview shows how many machines would fire right now, and their values ("2 of 18 robots would fire"). Last 7 days replays the rule: "About 14 times on 3 machines", with a bar per day. If that is a lot, it suggests a longer time, a stricter value or fewer machines. Tune rules here, not after a week of noise.
Where a rule runs matters for robots that lose their link:
- On the machine: when every condition is a per-machine threshold on a metric the agent measures (such as CPU, memory, disk, temperature, power, GPU or your app metrics), joined by and. The agent checks it every second, offline too, and the alert arrives when the machine reconnects.
- In PhysicalFleet: everything else (normal ranges, peers, changes, events, logs, offline, several machines), checked every 30 seconds.
The rule's card says which. If a rule must work offline, keep it to thresholds joined by and. Rules with several conditions need a recent agent to run on the machine; older agents have them checked in PhysicalFleet instead.
Built-in rules run on every machine from the start. Change their value, time or severity, turn them off, or remove them from every machine:
| Built-in rule | Fires when | Severity |
|---|---|---|
| Disk almost full | Any disk above 90 % for 5 min | Warning |
| Disk full | Any disk above 98 % for 1 min | Critical |
| Memory almost exhausted | Memory above 95 % for 2 min | Critical |
| CPU saturated | CPU above 95 % for 5 min | Warning |
| Running hot | A temperature sensor above 80 °C for 2 min | Warning |
| Under-voltage | The board reports low power | Critical |
| Arm tracking error | An arm off its planned path by more than 0.1 rad for 10 s | Warning |
Check: before saving, the 7-day replay should fire about as often as you would want to be told. A rule that would have fired every day for a week is a rule people will mute.
Route alerts to the right people
Add channels in Observability › Alerts › Channels (owners and admins). Each takes one field, and a test message goes out right away:
| Channel | What you paste |
|---|---|
| Slack | An incoming webhook URL |
| Up to 20 addresses | |
| PagerDuty | An Events API v2 integration key; incidents open and resolve with the alert |
| Microsoft Teams | A workflow webhook URL |
| Webhook | Any HTTPS URL; messages are signed JSON |
Your rules tell their own channels. Routes send everything else, each as a sentence: Send [critical] about [machine issues] from [machines in factory-a] to [#ops-factory-a]. Topics are your rules, machine issues, machines offline, rollouts, unusual behaviour and vulnerabilities. Each route has quiet hours (critical still goes through) and a rate limit, by default 10 messages in 10 minutes, then one digest.
Fewer, better messages are built in. A rule's messages are gathered for about 20 seconds ("CPU high: firing on 3 machines"). The same problem on many machines within 5 minutes reaches Slack, email and Teams as one summary after the first message. A resolution reaches every channel that heard the alert. PagerDuty gets every trigger and resolve, never gathered or rate-limited.
Webhooks are signed. Verify each message, reject old timestamps, and ignore duplicates by the X-PF-Delivery header, since failed deliveries are retried:
import hmac, hashlib, time
def verify(secret: str, body: bytes, timestamp: str, signature: str) -> bool:
# timestamp from X-PF-Timestamp, signature from X-PF-Signature
if abs(time.time() - int(timestamp)) > 300:
return False
expected = hmac.new(secret.encode(), f"{timestamp}.".encode() + body, hashlib.sha256).hexdigest()
return hmac.compare_digest(signature, f"v1={expected}")Each person can also choose their own email notifications in Settings › Account › Notifications, with a level, an hourly cap and quiet hours. Alerts and notifications have no meter on the bill.
Check: the Delivery log shows every message as Sent, Retrying, Held (quiet hours), Grouped, In a digest, Not sent (muted or flapping) or Failed, with the error.
Work the inbox, not the notifications
- Firing, Acknowledged, Snoozed and Resolved, filtered by From my rules, From PhysicalFleet or Critical only.
- Worth a look collects findings that aren't alerts: release impact, fleet trends, machines unlike their peers, rollouts that finished with failures. They reach a channel only if a route asks for them.
- Started together: different alerts that start within two minutes on several machines in one place sit in one card, such as "Likely one cause: probably the site's network".
- The release that came just before: "Started 12 min after release vision-stack 2.4.1 reached 8 machines".
- Flapping: an alert that opened four or more times in an hour is marked and stops sending. A short data gap or an offline machine is not a recovery: the alert keeps firing.
Open a row for the probable cause and what to do, the machines and their values, Timeline and Recording links, the rule, and where messages went. Everyone can Acknowledge (it shows who is on it), Snooze, Investigate (the machine's timeline at the moment it started) and Explain with AI. Owners and admins can Mute for a scope and a time, with a reason everyone sees, or edit the rule.
Check: at the end of a shift, nothing should sit in Firing unacknowledged. Rows that keep coming back are rules to fix, not alerts to mute.
Match bandwidth and data budgets to each link
A lab robot on Wi-Fi and a field robot on a SIM card need different amounts of data. Two settings decide it: bandwidth (how much a machine sends) and storage (how much of its disk the agent may use).
| Level | Telemetry | Logs | App traces | Idle data a day |
|---|---|---|---|---|
| Very low | Every 15 min | Errors only | Errors only | About 1 MB |
| Low | Every 5 min | Warnings and up | 30 a minute | About 4 MB |
| Normal (default) | Every minute | Info and up | 300 a minute | About 25 MB |
| High | Every 30 s | More info lines | 1,200 a minute | About 80 MB |
| Very high | Every 10 s | Debug and up | All | About 300 MB |
What a person asks for always works, whatever the level or budget: snapshots, live camera, terminal, commands and requested recordings. While someone has the machine's page open, it sends data every second and logs within about two seconds.
Set fleet defaults in Settings › Organization › Fleet › Machine defaults, and override one machine on its Overview › Settings. Data transfer is billed at $0.15 per 100 MB (free on the Free plan); see pricing.
Check: the machine's Bandwidth box shows what it is doing now, for example "Running at Normal · 18 MB sent today", and pf status prints the level and the budget state.
Ask your fleet for what the charts don't answer
Some questions cross every page: which machines need attention and why, what changed in the last 24 hours, why the cameras on line 3 drop frames. Ask your fleet answers them in plain words from your fleet's live data. Open it with the blue button in the top bar or ⌘J (Ctrl+J), or start from context with Ask about this machine, or Explain with AI on an issue, insight, alert or rollout.
It reads as the person asking: your organization, your role and the fleet filter you have on. It reads the same data the dashboard shows, and can run read-only aggregate queries across telemetry, events, logs and traces. Answers show the steps it took, links into the dashboard, and tables and charts drawn from the real series, so the numbers come from your fleet, not from the model.
It can't change anything by itself. Suggested actions (reboot, restart the agent, save a recording, take a snapshot, pause, resume or cancel a rollout) are buttons that run only when you press Run and confirm, with your own permissions. Text from machines is treated as data, not instructions. Conversations are private to each person, and your data is not used to train AI models.
AI chat is billed by tokens, $0.03 per 10K tokens the AI reads and writes, about $0.20 for a typical question (free on the Free plan).
Check: ask "Which machines need attention right now, and why?" and follow the links. The answer should match the Overview and the Inbox.
- Install the agent on every robot and confirm it shows online.
- Start each long-running app with pf run --name, with the same name on every robot.
- Report health from the main loop with pf health set and a --ttl.
- Send a few pf.metric values named with their unit, with labels you filter by.
- Wrap perception, planning, inference and actuation in spans, and pass trace headers to model servers.
- Add app logs from files or with pf.capture_logs(), not both for the same lines.
- Turn on suggested rules, then write rules on task success, cycle time and model problems.
- Use outside its normal range for metrics with daily rhythms.
- Give every rule a message and a runbook link.
- Preview each rule on the last 7 days before saving it.
- Add a channel, send a test, and route critical alerts.
- Set bandwidth levels and a data budget for cellular robots.
Alerting on causes instead of symptoms
A CPU alert fires on busy robots that are fine. Alert on task success, cycle time or a model problem, and let issues and insights explain the cause.
Fixed thresholds on metrics with daily rhythms
A threshold that fits the day shift fires every night. Use outside its normal range, which learns each machine's normal per hour of the day.
Ids and timestamps as metric labels
Labels are for dimensions you filter by. A label that changes every call creates endless series and makes charts and rules useless.
Collecting the same log lines twice
An app whose output already goes to journald or Docker is collected anyway. Adding the library too doubles every line. Pick one per app.
One alert per machine for a site-wide problem
Fifty messages for one network outage get muted. Use Only when several machines match, so the group raises one alert.
Expecting every rule to run offline
Only per-machine thresholds joined by and run on the robot. Rules with or, baselines, peers, events or logs are checked in PhysicalFleet and need the link.
Rules without a message or runbook
An alert nobody knows how to handle gets snoozed. Write what to do in the rule's message and link the runbook.
Cellular robots without a data budget
Auto drops to Low on cellular, but only a daily or monthly budget keeps a SIM plan safe. Set one per machine or as a fleet default.
Written for PhysicalFleet as of December 3, 2026.
What does PhysicalFleet monitor without code changes?
Hardware and system metrics, storage health, logs from journald, Docker and files, events such as crashes and USB changes, a change timeline, the ROS 1 or ROS 2 graph with topic rates, other robot middleware, cameras and the models each machine runs. Every problem gets a probable cause and what to do.
Do alerts work when the robot is offline?
Yes, for per-machine thresholds joined by and: they run on the robot every second, offline too, and the alert is delivered when it reconnects. The built-in rules work this way. Rules on baselines, peers, events, logs or several machines are checked in PhysicalFleet.
How do I avoid alert storms across a robot fleet?
Use one rule with Only when several machines match for site-wide problems. The inbox shows one row per problem, folds alerts that started together in one place, and stops sending for flapping alerts. Channels gather a rule's messages and send the same problem on many machines as one summary.
Which notification channels are supported?
Slack, email, PagerDuty, Microsoft Teams and signed webhooks. Routes send machine issues, offline machines, rollouts, unusual behaviour and vulnerabilities to the right channel, with quiet hours and a rate limit.
How do I send metrics from C++ or Rust?
Send JSON records over UDP to the agent on the same machine: metrics, events, spans and logs. It never blocks, and the agent accepts it only on loopback. The record format is in the docs in the dashboard; there is no C++ library.
How much data does monitoring use on a cellular link?
About 4 MB a day idle at Low, which Auto picks on a cellular modem, and about 1 MB at Very low. Set a daily or monthly data budget and the agent steps down to stay within it. What a person asks for, such as a terminal or a snapshot, always works.
Can the AI assistant change anything on my robots?
No. Ask your fleet is read-only and reads as you. Suggested actions are buttons that run only when you press Run and confirm, with your own permissions.
How long is monitoring data kept?
With a card on file, nothing is deleted by default until your organization picks a retention period: 7 days, 30 days, 6 months or 1 year. Without a card, data is kept 90 days. Data kept beyond its first 30 days counts as Storage.
From the lab bench. To the entire fleet.
Connect your first machine in minutes, develop it in the lab and run your whole fleet in production from one place.
Free for up to 3 machines · Then pay as you go