feat(health): add NVUE REST reboot and leakage collection#3125
feat(health): add NVUE REST reboot and leakage collection#3125jayzhudev wants to merge 2 commits into
Conversation
Signed-off-by: Jay Zhu <jayzhu@nvidia.com>
WalkthroughThis PR adds NVUE REST collection for system reboot reason and platform environment leakage. It introduces nullable response handling, new REST client methods and payload types, collector emission and report logic, config toggles, sink event variants, and updated validation coverage. ChangesNVUE reboot reason and leakage collection
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Collector
participant RestClient
participant NvueDevice
participant Sink
Collector->>RestClient: get_platform_environment_leakage()
RestClient->>RestClient: check platform_environment_leakage_enabled
alt disabled
RestClient-->>Collector: Disabled
else enabled
RestClient->>NvueDevice: GET /nvue_v1/platform/environment/leakage
NvueDevice-->>RestClient: JSON payload or null
RestClient-->>Collector: Present(sensors) or Null
end
alt Present(sensors)
Collector->>Collector: build_leakage_report(sensors)
Collector->>Sink: emit StateSet metrics + switch health report
else Null
Collector->>Sink: emit leakage-unavailable alert report
end
Related Issues: Suggested labels: enhancement, health Suggested reviewers: none identified As a rabbit probes the wires with care, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/health/src/collectors/nvue/rest/collector.rs`:
- Around line 548-573: The emit_reboot_reason_data method is attaching unbounded
free-text fields as labels on reboot_reason_info, which can explode cardinality
and leak operator data. Update emit_reboot_reason_data in the nvue REST
collector to keep only bounded labels (or none) and move reason, user, and
gentime to structured logging or another non-metric event path. Ensure the
Prometheus labels emitted by emit_metric stay stable and low-cardinality.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 7aa4abb2-7191-442e-b939-2f86d508b653
📒 Files selected for processing (5)
crates/health/example/config.example.tomlcrates/health/src/collectors/nvue/rest/client.rscrates/health/src/collectors/nvue/rest/collector.rscrates/health/src/config.rscrates/health/src/sink/events.rs
Keep only reason on reboot_reason_info. Log user and gentime as structured fields to avoid timestamp churn and operator data in Prometheus labels. Signed-off-by: Jay Zhu <jayzhu@nvidia.com>
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
Added NVUE REST collection for:
/nvue_v1/system/reboot/reason/nvue_v1/platform/environment/leakageBehavior:
reboot_reason_infometadata withreason,gentime, anduser.oksensors become successes.leaksensors become leak alerts.nullstates become sensor-failure alerts.nullbecomes a sensor-failure alert because of unavailable data.Related issues
Closes #3123
Type of Change
Breaking Changes
Testing