Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix(patrol): clarify wearout semantics so AI knows 100% = healthy (#1300)

rcourtman3006f51b605a
diff --git a/internal/ai/patrol_ai.go b/internal/ai/patrol_ai.go
index 350bf80b1d..bcaf316918 100644
--- a/internal/ai/patrol_ai.go
+++ b/internal/ai/patrol_ai.go
@@ -1860,8 +1860,8 @@ func (p *PatrolService) seedHealthAndAlerts(state models.StateSnapshot, scopedSe
if !hasIssues {
sb.WriteString(fmt.Sprintf("All %d disks healthy (SMART PASSED).\n", len(state.PhysicalDisks)))
} else {
- sb.WriteString("| Node | Device | Model | Health | Wearout | Temp |\n")
- sb.WriteString("|------|--------|-------|--------|---------|------|\n")
+ sb.WriteString("| Node | Device | Model | Health | SSD Life Remaining (100%=new) | Temp |\n")
+ sb.WriteString("|------|--------|-------|--------|-------------------------------|------|\n")
for _, d := range state.PhysicalDisks {
wearout := "—"
if d.Wearout >= 0 {
diff --git a/internal/ai/tools/data_types.go b/internal/ai/tools/data_types.go
index e674c1f703..a9f781afb7 100644
--- a/internal/ai/tools/data_types.go
+++ b/internal/ai/tools/data_types.go
@@ -1107,7 +1107,7 @@ type PhysicalDiskSummary struct {
Type string `json:"type"` // nvme, sata, sas
SizeBytes int64 `json:"size_bytes"`
Health string `json:"health"` // PASSED, FAILED, UNKNOWN
- Wearout *int `json:"wearout,omitempty"` // SSD wear percentage (0-100), nil when unavailable
+ Wearout *int `json:"wearout,omitempty"` // SSD life remaining percentage (100=new/healthy, 0=end of life), nil when unavailable
Temperature *int `json:"temperature,omitempty"` // Celsius, nil when unavailable
RPM *int `json:"rpm,omitempty"` // 0 for SSDs, nil when unavailable
Used string `json:"used,omitempty"`