Skip to content

gpu report: host metrics ingestion, temp/power exposure, retention decoupling - #113

Merged
Thangnguyenvn98 merged 7 commits into
mainfrom
agent/gpu-temp-power-badges
Sep 3, 2026
Merged

Thangnguyenvn98 merged 7 commits into
mainfrom
agent/gpu-temp-power-badges

Conversation

@Thangnguyenvn98

Copy link
Copy Markdown
Collaborator

What

Foundation PR of the GPU infra-health stack (spec: wayfinding trail in ~/.scratch/vllm-gpu-infra-health/). Three commits:

  1. Host metrics ingestion — the report route accepts an optional host object (CPU util/count, RAM bytes, per-mount disks with role classification), reporter_status/last_error, and k8s node_conditions. New tables host_snapshots + host_history_5m (raw + 5-min rollup, mirroring the GPU pattern) and alert_thresholds seeded with unreporting=10min / disk=90% / temp=85°C — thresholds are tuned by editing rows in Supabase, no redeploy. Legacy GPU-only payloads stay valid so old reporters keep working during rollout.
  2. Temp/power + freshness vocabulary — the /gpu table surfaces the already-stored GPU temperature and power; the offline badge becomes Stale (5 min, UI-only) / Unreporting (10 min, matches the alerting condition).
  3. Retention decoupling — GPU raw-snapshot cleanup moves out of the queue-poll cron into a dedicated daily /api/cron/retention that also covers host_snapshots (raw 30 days; rollups kept forever).

Hardening included

Ingestion auth is fail-closed (unset GPU_REPORT_SECRET → 503, not open access), payloads are strictly validated with a streaming body cap (GPU_REPORT_MAX_BYTES, 256 KiB default), and hostnames are lowercased on ingest.

Test plan

  • Contract tests at the route seam (old/new/degraded/invalid/oversized payloads, auth behavior): npm test 74/74
  • Migration tests: 27 passed; eslint clean

Deploy notes

Migration 0018_gpu_host_ingest.sql is already applied to production. Merge order: after #112 (independent), before the stacked host-UI / infra-alerting / reporters PRs.

Thang Nguyen added 3 commits September 2, 2026 19:15
Add the host-metrics half of the GPU report contract: an optional host
object (cpu_util/cpu_count, RAM byte triple, per-mount disks with role
classification), reporter_status/last_error, and Kubernetes
node_conditions. Legacy GPU-only payloads remain valid.

- migration 0018: host_snapshots + host_history_5m (raw + 5-minute
  rollup, mirroring the GPU tables) and alert_thresholds seeded with
  the unreporting/disk/gpu-temperature defaults; all RLS-protected
- storage: one transaction writes GPU rows, host snapshot, and both
  rollups; hostnames normalized to lowercase on ingest
- route: fail-closed auth (unset GPU_REPORT_SECRET is a 503
  configuration error, not open access), strict payload validation with
  per-field ranges, and a streaming body cap (GPU_REPORT_MAX_BYTES,
  256 KiB default, 4 MiB ceiling)
- contract tests at the route seam; migrations tests assert the new
  tables, seed rows, and RLS grants

Signed-off-by: Thang Nguyen <thang.nguyen@inferact.ai>
Surface the already-stored GPU temperature and power on the /gpu host
table (own columns, threshold-colored temp, per-GPU values in the
existing memory-bar tooltips) and replace the binary offline badge with
the fleet vocabulary: Stale after 5 minutes without a report,
Unreporting after 10, matching the alerting condition.

queryGpuLatest now selects temperature_c/power_draw_w/power_limit_w and
the host row model carries maxTemperatureC and aggregate power fields.

Signed-off-by: Thang Nguyen <thang.nguyen@inferact.ai>
GPU raw-snapshot cleanup previously ran inline in poll-metrics, so a
Buildkite queue-poll failure would silently stop GPU retention too.
Move it to a dedicated /api/cron/retention Vercel cron (daily) that
also covers the new host_snapshots table. Raw rows keep 30 days on both
families; the 5-minute rollups are kept forever as the long-range
history source. queue_snapshots cleanup stays with its own poll.

Signed-off-by: Thang Nguyen <thang.nguyen@inferact.ai>
@vercel

vercel Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
vllm-ci-dashboard Ready Ready Preview Sep 3, 2026 2:12am UTC

Request Review

…t env docs

Signed-off-by: Thang Nguyen <thang.nguyen@inferact.ai>
Thang Nguyen added 3 commits September 2, 2026 22:11
Signed-off-by: Thang Nguyen <thang.nguyen@inferact.ai>
Co-authored-by: Thang Nguyen <thang.nguyen@inferact.ai>
…nfra tab + per-alert docs (#115)

Signed-off-by: Thang Nguyen <thang.nguyen@inferact.ai>
Co-authored-by: Thang Nguyen <thang.nguyen@inferact.ai>
…fix, and pytest coverage (#116)

Signed-off-by: Thang Nguyen <thang.nguyen@inferact.ai>
Co-authored-by: Thang Nguyen <thang.nguyen@inferact.ai>
@Thangnguyenvn98
Thangnguyenvn98 force-pushed the agent/gpu-temp-power-badges branch from c461c9e to 3f22258 Compare September 3, 2026 02:12
@Thangnguyenvn98
Thangnguyenvn98 merged commit b886b16 into main Sep 3, 2026
3 of 4 checks passed
@Thangnguyenvn98
Thangnguyenvn98 deleted the agent/gpu-temp-power-badges branch September 3, 2026 02:15

This branch was successfully deployed

1 active deployment
Preview — 3f222583 Deployed Sep 3, 2026 by vercel[bot]
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.

1 participant