Files
sencho/docs/features/fleet-view.mdx
T
Anso d7d8f9bfe8 feat(dashboard): replace 24h charts with Configuration Status and Recent Activity (#785)
* feat(dashboard): replace 24h charts with Configuration Status and Recent Activity

The 24-hour CPU/Memory area charts summed per-container metrics normalized
to each container's CPU quota, producing numbers that bore no honest
relationship to host load. The live ResourceGauges strip already shows
accurate host-level stats, making the historical charts both inaccurate
and redundant.

This commit replaces that row with two side-by-side cards:

- **Configuration Status**: aggregates every toggleable feature on the
  active node (notification agents, alert rules, routing rules, auto-heal,
  auto-update, webhooks, scheduled tasks, MFA, SSO, vulnerability scanning,
  cloud backup, and alert thresholds) into a single at-a-glance card.
  Tier-locked rows display an upgrade indicator instead of a value.
  Each row is clickable and navigates to the relevant settings section.
  Data refreshes every 60 s and immediately on state-invalidate events.

- **Recent Activity**: lists the ten most recent notification-history events
  for the active node (deployments, image updates, auto-heal actions, scan
  findings, cloud backup events, system notices) with category icons and
  relative timestamps. Refreshes every 30 s.

New backend endpoints:
- GET /api/dashboard/configuration - per-node feature status with locked/
  requiredTier markers so the frontend renders upgrade chips without extra
  calls. The endpoint sits after authGate and before the remote proxy so
  remote-node requests are transparently forwarded.
- GET /api/dashboard/recent-activity?limit=N - thin wrapper over
  DatabaseService.getNotificationHistory.
- GET /api/fleet/configuration - fleet-wide fan-out using the same
  Promise.allSettled dead-node-tolerant pattern as /fleet/overview.
  Exposed as the new "Status" tab on the Fleet page (after Snapshots).

Shared utilities:
- visibilityInterval and formatCount extracted to frontend/src/lib/utils.ts
  so the three polling hooks and two components share a single copy.

* docs(dashboard): fix stale alt text referencing removed historical charts
2026-04-26 18:42:28 -04:00

261 lines
13 KiB
Plaintext

---
title: Fleet View
description: Monitor all your nodes from a single dashboard with real-time health metrics, search, filtering, and container drill-down.
---
The **Fleet** tab gives you a bird's-eye view of every node in your Sencho deployment, local and remote, on one screen. It is available to all tiers, with advanced features unlocked by Skipper and Admiral.
<Frame>
<img src="/images/fleet-view/fleet-overview.png" alt="Fleet Overview with the fleet masthead, grid/topology toggle, and pinned local node" />
</Frame>
## Page layout
### Fleet masthead
The top of the page is a status masthead that summarises the state of the entire fleet at a glance:
- **Status word** in italic display type: **The fleet** with a pulsing coloured rail (green when all nodes are online and healthy, amber when any node is offline, rose when any node is critical)
- **Meta line** showing node count, online count, and last sync time (e.g. "2 nodes · 1 online · last sync 7s")
- **Reasons** line appears when the fleet is degraded, summarising what's wrong ("1 offline · 1 critical")
- **Stats cluster** with three tiles:
- **CPU**: average across online nodes, with the peak node and percentage called out below
- **MEM**: total RAM used across the fleet, with total capacity and percentage
- **CONTAINERS**: active running count; hover the tile to see a breakdown of running vs total
- **Alerts** indicator on the right shows the current critical count, highlighted in rose when above zero
### Grid / Topology toggle
Below the masthead, switch between two layouts:
- **Grid** (default): one card per node. The local node is pinned at the top with a cyan accent rail and a ★ Local badge so it is never confused with a remote.
- **Topology**: an interactive hub-and-spoke diagram with the local node on the left and remotes radiating to the right. Each node renders as a rack card with a status pill (Online, Critical, or Offline), a Local or Remote badge, CPU, memory, and disk bars, and a stack and running-container summary. The local node is framed with a cyan ring; critical nodes show a lightning icon; offline nodes are muted. Connector lines colour by link health (cyan when online, amber when critical, dashed when offline). Pan, zoom, drag nodes, and use the minimap to navigate large fleets. Click a node to jump to its details.
<Frame>
<img src="/images/fleet-view/fleet-topology.png" alt="Fleet Topology view showing the local node connected to a remote, each rendered as a rack card with CPU, memory, and disk bars" />
</Frame>
### Tabs
The Fleet page has three tabs:
- **Overview**: the monitoring view described on this page
- **Snapshots**: fleet-wide backup snapshots (covered in [Fleet Backups](/features/fleet-backups))
- **Status**: fleet-wide feature status rollup (covered below)
### Action buttons
Two buttons sit in the top-right corner:
| Button | What it does |
|--------|--------------|
| **Check Updates** | Opens the Node Updates modal to view and apply Sencho version updates across your fleet (Skipper+) |
| **Refresh** | Re-fetches data from all nodes. Shows a spinner while loading |
## Community features
Every Sencho installation gets the full fleet monitoring grid at no cost.
### Node grid
Each node appears as a card showing:
| Data | Description |
|------|-------------|
| **Status badge** | Online (green) or Offline (grayed out) |
| **Type badge** | `local` or `remote` |
| **Version badge** | The node's Sencho version (e.g. `v0.38.0`). Remote nodes running older versions that cannot report their version show no version badge |
| **Update available badge** | Orange pill shown when a newer Sencho version is available for this node |
| **Critical badge** | Red pill shown when CPU or disk usage exceeds 90% |
| **Running containers** | Count of containers in `running` state |
| **Stopped containers** | Count of containers in `exited` state |
| **Stacks** | Total number of Compose stacks on the node |
| **CPU usage** | Current percentage with colour-coded bar (green to amber to red) |
| **RAM usage** | Used / total with percentage bar |
| **Disk usage** | Used / total with percentage bar |
Nodes with an available Sencho update also show an **Update to vX.Y.Z** button at the bottom of the card.
Offline nodes are visually dimmed and show a "Node unreachable" placeholder instead of stats.
### Manual refresh
Click the **Refresh** button in the top-right to re-fetch data from all nodes. The button shows a spinner while loading.
---
## Paid features
<Note>
The features below require a Skipper or Admiral license. Community users see an upgrade prompt in place of these controls.
</Note>
### Auto-refresh
Fleet data automatically refreshes every 30 seconds. A subtle indicator at the bottom of the page confirms this is active. When a node update is in progress, the refresh rate increases to every 5 seconds so you can watch status changes in near real-time.
### Search
The search bar filters the node grid in real time. It matches against:
- Node names (e.g. typing `dev` shows only nodes with "dev" in the name)
- Stack names (e.g. typing `plex` shows only nodes that have a "plex" stack)
### Sorting
Use the sort dropdown to order nodes by:
- **Name** (alphabetical)
- **CPU Usage** (highest first)
- **Memory Usage** (highest first)
- **Containers** (most first)
- **Status** (online first)
Click the arrow button next to the dropdown to toggle ascending/descending.
Sort preferences are saved to your browser and persist across sessions.
### Filtering
Filter pills let you narrow the grid:
| Filter | Options |
|--------|---------|
| **Status** | All, Online, Offline |
| **Type** | All Types, Local, Remote |
| **Critical Only** | Show only nodes with CPU or disk above 90% |
| **Tags** | Filter by stack labels assigned to nodes |
A "Clear filters" button appears when filters hide all nodes.
### Stack drill-down
Click **Stack details** on any online node card to expand the stack list. The button shows the total stack count (e.g. "18 stacks"). Each stack in the list shows a container count badge.
Click a stack name to expand it further and see individual containers with:
- Container name
- State badge (running, exited, restarting)
- Image name (e.g. `linuxserver/plex:latest`)
- Uptime (e.g. "Up 4 days")
Container data is fetched fresh each time you expand a stack, so you always see the current state.
Hover over any container row to reveal an **Open in editor** button that navigates you directly to that stack's editor on the corresponding node.
<Frame>
<img src="/images/fleet-view/fleet-drill-down.png" alt="Fleet View with Stack details expanded showing the stack list and a container drill-down" />
</Frame>
### Critical node detection
Nodes with CPU or disk usage above 90% automatically receive a red **Critical** badge. Combined with the **Critical Only** filter, this lets you quickly triage overloaded servers.
### Node Updates
Click **Check Updates** in the header to open the Node Updates modal. This lets you manage Sencho version updates across your entire fleet from one place.
<Frame>
<img src="/images/fleet-view/fleet-node-updates.png" alt="Node Updates modal showing update status for all fleet nodes" />
</Frame>
The modal shows:
- **Summary cards** at the top: counts of nodes that are Up to date, have updates Available, are currently Updating, or have Failed
- **Latest version** label showing the newest available Sencho release (checked via GitHub Releases, cached for 30 minutes)
- **Filter** search box to find specific nodes
- **Node table** with columns: Node name, Type, Current version, Latest version, and Status (either an "Up to date" badge or an "Update" button)
- **Recheck** button to refresh the latest version from GitHub and re-scan for available updates
- **Update All** button to trigger updates on all remote nodes that have a pending update
When you click **Update** on a remote node, Sencho sends the update command to the remote instance. The remote pulls the latest Docker image, then spawns a short-lived helper container that performs the compose recreate. The node restarts with the new version, and the status badge transitions from "Updating" to "Updated" once the gateway detects the version change. The "Updated" badge remains visible for 60 seconds before the node returns to "Up to date".
If you update the local node, a confirmation dialog appears first, then a reconnection overlay shows while your primary instance restarts.
<Note>
Triggering updates (both individual and bulk) requires admin privileges. Users with viewer or operator roles can see update status but cannot initiate updates.
</Note>
**How self-update works:** Each Sencho instance reads its own Docker Compose labels to determine the image name, compose file path, and service name. It pulls the latest image directly, then spawns a helper container that mounts the compose directory from the host and runs `docker compose up --force-recreate`. This approach works regardless of the container's own volume mounts.
---
## Fleet Status tab
The **Status** tab gives you a fleet-wide summary of which automations and security features are active on each node, without having to open each node's settings individually.
<Frame>
<img src="/images/fleet/configuration-tab.png" alt="Fleet Configuration tab showing per-node configuration summaries with one online node and one offline node" />
</Frame>
Each node appears as a card. Online nodes display a compact two-column summary grid:
| Field | What it shows |
|-------|---------------|
| **Agents** | Delivery agents configured on this node |
| **Alert rules** | Number of per-stack alert rules |
| **Auto-heal** | Active auto-heal policies |
| **Webhooks** | Outbound webhook triggers |
| **MFA** | Whether MFA is set up for the admin account |
| **Scanning** | Active vulnerability scan policies |
| **Backup** | Cloud backup provider, or Disabled |
| **Crash detect** | Whether global crash detection is on |
Offline nodes show a muted card with "Node is unreachable. Configuration unavailable." The online/offline badge confirms the node's current reachability at the time of the last fetch.
The tab fetches configuration data from all nodes in parallel. A dead node does not block the others from rendering.
---
## How fleet data is fetched
Fleet View queries all registered nodes in parallel. Each node responds independently; one slow or offline node does not block the others. Local node data comes from the Docker socket and system stats directly. Remote node data is fetched over the Distributed API proxy using each node's Bearer token.
<Note>
Fleet View always runs on your primary (local) Sencho instance. It is never proxied through a remote node.
</Note>
---
## Troubleshooting
### Version shows as "unknown" for a remote node
This means the remote node's `/api/meta` endpoint did not return a valid version. Common causes:
- **Remote node is offline or unreachable.** Check that the node's API URL and token are correct in the node configuration.
- **Remote node is running an older Sencho version** that predates the version reporting feature. Update the remote node manually (pull the latest Docker image and restart the container) to restore version reporting.
Once the remote node is reachable and running a current Sencho version, its version will appear automatically on the next fleet refresh.
### "Update All" says no updates available
The **Update All** button only triggers updates on remote nodes that:
1. Report a valid version lower than the latest available Sencho release
2. Support the self-update capability (requires running in Docker)
If a remote node's version is unresolvable ("unknown"), the **Update** button on its individual card will still be available, but **Update All** requires both versions to be known for a safe comparison.
### Update fails with "no such file or directory"
If a remote node update fails with an error mentioning a compose file path (e.g. "open /path/to/compose.yaml: no such file or directory"), the remote node is running an older Sencho version (prior to v0.42.0) that attempted to access the compose file directly inside the container, where the host path does not exist.
**Resolution:** Update the remote node manually once by SSH-ing into the host and running:
```bash
docker compose pull && docker compose up -d
```
After this one-time manual update, the node will have the fixed self-update mechanism and all future updates can be triggered from Fleet Overview.
### Update shows "Remote node is unreachable"
This means the gateway could not connect to the remote node's `/api/meta` endpoint. Check that:
- The remote node is powered on and running
- The API URL configured for this node is correct and reachable from the gateway
- The network allows traffic between the gateway and remote node on the configured port
- The remote node's Sencho container is healthy (`docker ps` should show it as running)
### Update button returns "Admin access required"
Fleet update operations (individual updates, Update All) require an admin account. If you see a 403 error when clicking **Update**, ask your Sencho administrator to either grant you admin privileges or perform the update on your behalf.