feat(remote): machine metrics (CPU/RAM/load/temps) for remote hosts#13
Merged
Conversation
Remote host cards now show live CPU%, RAM, load average, uptime, and temperatures — not just ping + container list. Gathered over the same single SSH round-trip as the container check (two /proc/stat samples for an instantaneous CPU%, plus meminfo/loadavg/uptime/nproc/hwmon), parsed by a new remote_metrics module that reuses the local /proc parsers. Configurable for the public repo: DASHBOARD_REMOTE_METRICS (default on) turns the whole thing off so cards fall back to ping + containers — e.g. if you'd rather run glances/netdata on the box, or don't want it at all. Temps follow the existing machineSensors panel toggle. Verified end-to-end against logan-gl502vs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds live machine metrics for configured remote SSH hosts so sidebar cards show CPU, RAM, load, uptime, and temperature readings alongside ping and container status.
Changes:
- Extends remote host checks to optionally gather
/procand hwmon metrics in the same SSH probe. - Adds backend parsing and serialization for remote machine metrics, with unit coverage.
- Updates frontend rendering, styling, and configuration docs for the new
DASHBOARD_REMOTE_METRICStoggle.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/routes.rs |
Passes the remote metrics config flag into remote host checks. |
src/remote.rs |
Combines container and optional metrics collection in one SSH probe and returns metrics in host status. |
src/remote_metrics.rs |
Adds remote metrics shell script output parsing and tests. |
src/metrics.rs |
Exposes existing /proc helper parsers for reuse by remote metrics. |
src/main.rs |
Registers the new remote_metrics module. |
src/config.rs |
Adds DASHBOARD_REMOTE_METRICS configuration support. |
frontend/metrics.ts |
Adds remote metrics types and rendering for host cards. |
public/metrics.js |
Updates generated served JavaScript for the frontend changes. |
public/app.css |
Adds compact remote metrics card styling. |
.env.example |
Documents the remote metrics configuration flag. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remote host cards in the sidebar now show live machine metrics — CPU%, RAM, load average, uptime, and temperatures — instead of just ping + the container list.
How
##SD_*sections (two/proc/statsamples for an instantaneous CPU%, plusmeminfo/loadavg/uptime/nproc/hwmon temps).src/remote_metrics.rsparses those sections, reusing the local/procparsers inmetrics(cpu_sample/meminfo_kb). Unit-tested..meterstyling. Temps follow the existingmachineSensorspanel toggle.Configurable (it's a public repo)
DASHBOARD_REMOTE_METRICS(default on) — set to0to keep remote cards to ping + containers only, e.g. if you'd rather run glances/netdata on the remote box, or just don't want machine monitoring. Documented in.env.example.Verified
cargo test(28 pass) + end-to-end againstlogan-gl502vs: card shows CPU 17%, 8 cores, RAM 8.3/15.5 GiB, load, uptime 125d, and temps (coretemp / NVMe / ACPI).🤖 Generated with Claude Code