Skip to content

feat(remote): machine metrics (CPU/RAM/load/temps) for remote hosts#13

Merged
falkoro merged 1 commit into
masterfrom
feat/remote-machine-metrics
May 31, 2026
Merged

feat(remote): machine metrics (CPU/RAM/load/temps) for remote hosts#13
falkoro merged 1 commit into
masterfrom
feat/remote-machine-metrics

Conversation

@falkoro
Copy link
Copy Markdown
Owner

@falkoro falkoro commented May 31, 2026

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

  • One SSH round-trip per host (unchanged count): the container script now also emits marked ##SD_* sections (two /proc/stat samples for an instantaneous CPU%, plus meminfo/loadavg/uptime/nproc/hwmon temps).
  • New src/remote_metrics.rs parses those sections, reusing the local /proc parsers in metrics (cpu_sample/meminfo_kb). Unit-tested.
  • Frontend renders a compact CPU/RAM meter block + load/uptime line + temp chips inside each remote-host card, reusing the existing .meter styling. Temps follow the existing machineSensors panel toggle.

Configurable (it's a public repo)

DASHBOARD_REMOTE_METRICS (default on) — set to 0 to 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 against logan-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

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>
Copilot AI review requested due to automatic review settings May 31, 2026 11:21
@falkoro falkoro merged commit 9cd803d into master May 31, 2026
@falkoro falkoro deleted the feat/remote-machine-metrics branch May 31, 2026 11:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /proc and 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_METRICS toggle.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants