v0.169.0: disk-health card + degradation notification (Lemezek állapota)

Consumes the agent v0.94.0 smart payload (MinAgent floor unchanged; feature-detect
by presence). One pure verdict fn agentapi.DiskVerdictFor shared by the dashboard
card and the 6h check. Card via a 60s /disks TTL cache (anti-smartctl-storm);
unreachable agent -> Nincs adat, page never blocks. disk-health-check (6h) emits
disk_health_degraded on a degradation only vs an in-memory baseline (first run
silent, recovery/UNKNOWN never notify, multi-attr -> one event). No global banner
(deliberate). Pairs with the hub allowlist bump.

Tests: verdict table (>=90 red-proof), notifier emit, check first-run-silent
(red-proof), degradation-once, recovery-silent, UNKNOWN-excluded, FAILING-critical,
nil-smart card, TTL cache.
This commit is contained in:
2026-07-24 21:27:16 +02:00
parent e164fef70c
commit c97975c1df
16 changed files with 741 additions and 5 deletions
+30
View File
@@ -1,5 +1,35 @@
## Changelog
### v0.169.0 — Disk-health card + degradation notification ("Lemezek állapota") (2026-07-24)
Consumes the agent's new `smart` payload field (agent **v0.94.0**); **MinAgent floor unchanged** — the
feature detects by payload presence (nil → "Nincs adat", never alarms). Pairs with the hub allowlist
bump (adds `disk_health_degraded`). No new smartctl load anywhere — the agent serializes
already-computed SMART; the controller only reads it.
- **`agentapi`:** `SmartSummary` extended to the full counter set (SATA reallocated/pending/offline +
NVMe critical/media/percentage_used + power-on-hours); `DiskInfo` gains `Smart *SmartSummary`; new
pure `DiskVerdictFor(*SmartSummary) DiskVerdict` (the SINGLE source of truth for card + check) with
`Label()` (Rendben / Figyelmeztetés / Hiba / Nincs adat) + `DegradedAttributes`. Mapping: FAILING →
Hiba; PASSED with any of reallocated>0 / pending>0 / offline_uncorrectable>0 / critical_warning>0 /
media_errors>0 / percentage_used ≥ 90 → Figyelmeztetés; PASSED clean → Rendben; nil/UNKNOWN/empty →
Nincs adat (never alarms).
- **Dashboard "Lemezek állapota" card:** one row per PHYSICAL disk (label + colored verdict chip +
temperature). Fed by a **60 s in-process TTL cache** around `/disks` so dashboard refresh-spam cannot
smartctl-storm the host. An unreachable agent renders "Nincs adat" — the page never blocks.
- **6-hourly `disk-health-check`:** compares each physical disk's verdict against an in-memory baseline
and emits `disk_health_degraded` **only on a degradation** (verdict worsened). First run baselines
silently; recovery/improvement notifies nothing; **UNKNOWN is excluded both directions** (a transient
UNKNOWN blip never fires and never erases history); multiple attributes on one disk → ONE event.
Severity: warn (Figyelmeztetés) / critical (Hiba). The hub applies its own per-event-type cooldown.
- **Deliberately no global alert banner** (CONTEXT ruling) — the card + email carry it; banner fatigue
is a real cost. Not wired into the dead-app/alert-banner machinery. Controller restart re-baselines
silently (accepted, consistent with the health-change pattern).
Tests: verdict table (+ ≥90 boundary red-proof); notifier emit (type/severity/subject); check
first-run-silent (red-proof: disable the guard → first run notifies), degradation-once, recovery-silent,
UNKNOWN-excluded, FAILING→critical, nil-smart card graceful, TTL cache.
### v0.168.0 — Customer-configurable backup window ("Mentési időablak") (2026-07-24)
No agent coupling; MinAgent unchanged (the disk-tier gate is controller-side; the agent's cadence-based