VIEW YOUR FLEET IN THE SERVE-HUB APP
This guide installs the @swamp/serve-hub app on a hub so you can watch its
members from the hub's dashboard.
Note
Preview. Serve federation is a preview feature: no flag turns it on, and its commands and the serve-hub app may change in later releases. Every serve and every CLI that uses it must run Swamp 20261129.160739.0 or later.
Prerequisites
- A hub. See Set Up a Serve Federation Hub.
- The hub's dashboard on, with
dashboard: truein itsserve.yamlor--dashboard.swamp serve reloadappliesdashboard: truewithout a restart. - HTTPS to the hub, or a browser on the hub's own host. See Reach the dashboard over plain HTTP.
Install the app
In the hub's repository:
swamp extension pull @swamp/serve-hub
swamp app approve @swamp/serve-hubapprove asks for confirmation; add --yes where stdin is not a terminal.
Enabled: @swamp/serve-hub
Asks for: federation:read, data:read
This app can send anything it reads to external sites.federation:read reads the hub's live member list and each member's details.
data:read reads member history from the swamp/serve-member records. The app
writes nothing.
Grant viewers access
Each viewer needs:
readonaccess:swamp/federation, to see members- data read on
swamp/serve-member, to see member history
Without them the app shows a refusal that names the missing grant. See Manage Access Grants.
Open the app
Sign in to the hub's dashboard, then choose Open apps and Serve hub. The
app's address is /apps/@swamp/serve-hub on the hub.
The header counts members by status. Switch between two views:
- Fleet map: the hub in the centre and members in rings round it, online
nearest, then stale, then offline. Drag or scroll to pan; pinch or
Cmd/Ctrl-scroll to zoom.
Hreturns to the hub andFfits the fleet. The list at the bottom left names members that need attention: offline, stale or not on the hub's swamp version. - Table: name, status, swamp version, deployment mode, auth mode, TLS, remote-only, serve nodes, live instances and last seen. Filter by name, status, mode, auth, TLS, remote-only and "not on the hub's version". The hub is pinned first and is never counted or filtered.
Select a member to open its panel: its recorded configuration, each instance with its state, last check-in and runtime facts, its extensions and worker counts, and a history timeline of what changed and when.
The app refreshes every 30 seconds while it is visible, and at once when a member's record changes.
Reach the dashboard over plain HTTP
The dashboard needs HTTPS or localhost. Over plain HTTP to another host the
page is blank, and the browser console shows
crypto.randomUUID is not a function. Put the hub behind TLS (see
Set Up TLS for swamp serve), or
tunnel to it over SSH and browse localhost:
ssh -L 19600:127.0.0.1:19600 hub-hostThen open http://localhost:19600/dashboard.