The commands Wheelhouse runs#
The agent is a separate program that drives the router over its documented HTTP API. It
does not link against the router's code, and it does not shell out. Everything it knows
comes from the reads on this page, and everything it changes goes through /configure.
This is the whole list.
The router API endpoints it posts to#
| Endpoint | Used for | Client timeout |
|---|---|---|
/retrieve | showConfig, in JSON and in the native format | 30 s |
/show | every operational read | 30 s |
/configure | set, delete, commit, commit-confirm, confirm | 3 minutes |
/config-file | save and load | 3 minutes |
/container-image | pulling and deleting images | 15 minutes |
/image | add, delete, set_default, show system image | 15 minutes |
/traceroute | the diagnostics traceroute | 15 minutes |
/reboot, /poweroff | power actions | 15 minutes |
Three timeout tiers. A read that hangs must not hold a dashboard; a commit on slow hardware can run past fifteen seconds, and timing out mid-commit leaves the caller unable to tell whether it landed; an image pull is bounded by the uplink, and the router keeps pulling after the agent hangs up.
Two encodings, set by the router's own parser: most calls are form-encoded, but its form
parser requires a path field on every command, so operations that have none (confirm)
and fields it does not read (confirm_time) go as JSON instead.
Operational reads#
Every one of these is show <path> through /show. This is the complete list; nothing
else is read.
| Command | Behind |
|---|---|
show version | System, Overview, /api/version, the fleet health check |
show system uptime | System, Overview |
show system memory | System, Overview |
show system storage | System, Overview |
show system processes | Diagnostics |
show system image | System — boot images |
show system commit | System — the revision list |
show system commit diff <rev> | System — one revision's diff |
show system logging | warmed by the primer |
show hardware cpu | System, Overview |
show interfaces | Interfaces, the live stream, the throughput sampler |
show interfaces <kind> <name> | Interfaces — per-interface detail, and the QoS page's qdisc |
show interfaces wireguard | WireGuard |
show interfaces openvpn <mode> | OpenVPN, once per configured mode |
show ip route | Static routes, and uplink health on High availability |
show ipv6 route | Static routes, IPv6 |
show interfaces detail | IPv6 — every address with its scope |
show ipv6 neighbors | IPv6 |
show bgp summary | BGP / OSPF — BGP sessions, read only when BGP is configured |
show ip ospf neighbor | BGP / OSPF — OSPF adjacencies, read only when OSPF is configured |
show vrf, show ip route vrf all | VRF, read only when a VRF is configured |
show arp | Neighbours |
show lldp neighbors | High availability, LLDP |
show vrrp | High availability |
show wan-load-balance | High availability — the load balancer's own verdict |
show firewall statistics | Firewall — hit counters |
show nat source statistics, show nat destination statistics | NAT — hit counters |
show conntrack table ipv4 | Sessions |
show conntrack statistics | Sessions — per-CPU health |
show dhcp server leases | DHCP |
show dns forwarding statistics | DNS |
show dns dynamic status | Dynamic DNS |
show ntp | System |
show pki | Certificates |
show container | Apps |
show container image | Apps — is the image already here |
show container log <name> | One app's log |
show host lookup <host> | Diagnostics |
show log tail <n> | Logs |
show configuration commands | Every CLI panel, and /api/config/commands |
show vpn ipsec sa, show vpn ipsec connections | IPsec |
Re-derive it:
grep -ohE 'showText\([^,]*, [^)]*\)' agent/*.go | sort -uConfiguration subtrees it reads#
Through /retrieve with showConfig. The whole tree (an empty path) is read too — by
the reconcile diff, and by the Config tree page.
container protocols service dhcp-server
container name protocols bgp service dns
container network protocols ospf service dns dynamic
firewall protocols static service lldp
firewall group qos service ntp
firewall ipv4 system service suricata
high-availability pki service conntrack-sync
interfaces policy vpn ipsec
interfaces openvpn load-balancing nat
interfaces wireguard service service router-advert
vrfRe-derive it:
grep -ohE 'configOf\(vyos, [^)]*\)|configTag\(vyos, [^)]*\)' agent/*.go | sort -uWhat it writes#
Only through /configure, and only as set and delete operations whose path the
operator has seen. The staging endpoint refuses anything else:
[{"op":"set","path":["service","dns","forwarding","cache-size","10000"]},
{"op":"delete","path":["nat","destination","rule","10"]}]For a set, the last path element is the value — the router's own convention, and
why an empty path element is refused where the request can still say which operation is
wrong.
Commit-confirm is the router's native mechanism: confirm_time on the commit, and a
later confirm operation to cancel it. Miss the window and the router reboots, and starts
with its saved configuration: what save last wrote, not the configuration from before
the commit. That reboot is the rollback.
Rollback is not an operation at all. The router's HTTP API has no rollback; the CLI
command works by loading the archived configuration file for that revision, so
POST /api/rollback loads /config/archive/config.boot.<N>.gz through /config-file
and commits it.
What it costs the router#
Every call into the router's HTTP API forks a shell helper on the router, so the agent budgets calls, not intervals.
| Activity | Cost |
|---|---|
| The throughput sampler | one show interfaces every 5 s — one call for every interface |
| Each open tab of the web UI, whatever the page | one uncached show interfaces every 2 s, for the stream |
| Operational reads | cached for 3 seconds, served stale-while-revalidating |
| Per-interface detail | cached for 20 seconds |
| Configuration reads | cached for an hour, and invalidated by the agent's own commits |
| The primer | one warm-up pass at start, and one configuration-only pass every 10 s and after each commit |
Idle, that is roughly a dozen calls a minute.
The router serialises its HTTP API: concurrent reads are no faster than sequential, and each read is in the region of 150 to 800 milliseconds. The primer does not stagger its calls, and it does not refresh operational reads on a timer.
Reads that bypass the cache#
| Read | Reason |
|---|---|
The telemetry stream's show interfaces | A cached answer would not be current. |
| The throughput sampler's counters | Rate arithmetic needs new counters each time. |
The reconcile diff's showConfig | The cache is invalidated by the agent's own commits only, so a change made over SSH would stay invisible for up to an hour. |
GET /api/apps/plan also reads show container image uncached: it is asked right after
a pull, and the three-second cache would answer with the list from before it.
Two cautions#
See also#
- Which page writes which subtree
- Endpoint index — the agent endpoint each read is behind.
- Prometheus metrics —
wheelhouse_vyos_*and the cache counters. - The desired-state file — the uncached diff.
- Ports and listeners — where the router's API listens.
- The agent and the router
- Advanced mode and the router's commands
- Built on VyOS