Commit 0177fa0
committed
feat: sparkDash-derived host + serving metrics for every gateway
Phase 1/2 of the sparkDash integration, gateway-agnostic end to end
(all data flows through the existing agent payloads; no daemon, no
web server):
Agent 1.2.0 (agent_core collectors, pure parsers, graceful None):
- uptime (proc/uptime or kern.boottime), storage (statvfs), network
rx/tx rates (/proc/net/dev deltas, loopback/veth excluded)
- tailnet self-health (Self.Online, backend state, health warnings -
the healthy-on-LAN-but-off-tailnet blind spot), TTL-cached
- GPU process names via nvidia-smi --query-compute-apps
- live serving rates for running models: llama.cpp /slots per-slot
counter diffs, vLLM Prometheus generation/prompt token counters
(+ KV cache %, running/waiting), sglang /server_info counters with
sticky-throughput expiry. TTL-coalesced, loopback-only unless
ALLOW_REMOTE_HEALTHCHECK, idle reads 0, all failures degrade.
Swift (additive decode, old agents tolerated):
- HostMetricsPayload: uptime_seconds/storage/network/tailscale,
HostGPUProcess.name; ModelProfileStatus.serving (ServingMetrics)
- Remote Hosts card: uptime in header, STORAGE/NET lines, tailnet
status dot with warning reasons, GPU process name under models,
tok/s on running rows; dashboard row subtitles prefer live tok/s
over stored benchmark rows
Tests: 21 new collector/parser tests (failure-first), 5 decoder/
presentation tests, conformance allowlist updated for .
Verified collectors live on Spark (uptime 1.0h, storage 71.7%,
net 66.7 kbps, tailnet Running/100.122.96.76). 187 swift, 57 python.1 parent df12b5a commit 0177fa0
12 files changed
Lines changed: 1124 additions & 26 deletions
File tree
- RemoteAgent
- tests
- Sources
- ModelSwitchboardApp
- Gateways
- MenuBarContentView
- ModelSwitchboardCore/Models
- Tests/ModelSwitchboardCoreTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
0 commit comments