mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-18 10:02:16 +00:00
Update notification service
This commit is contained in:
@@ -1046,11 +1046,11 @@ export function StorageOverview() {
|
|||||||
<div className="grid grid-cols-2 gap-x-4 gap-y-2 pl-7 text-sm">
|
<div className="grid grid-cols-2 gap-x-4 gap-y-2 pl-7 text-sm">
|
||||||
<div>
|
<div>
|
||||||
<span className="text-muted-foreground">Size</span>
|
<span className="text-muted-foreground">Size</span>
|
||||||
<p className="font-medium">{disk.size || "N/A"}</p>
|
<p className="font-medium">{disk.size_formatted || disk.size || "N/A"}</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span className="text-muted-foreground">SMART Status</span>
|
<span className="text-muted-foreground">SMART Status</span>
|
||||||
<p className="font-medium">{disk.smart_status || "N/A"}</p>
|
<p className="font-medium capitalize">{disk.smart_status || "N/A"}</p>
|
||||||
</div>
|
</div>
|
||||||
{disk.serial && disk.serial !== "Unknown" && (
|
{disk.serial && disk.serial !== "Unknown" && (
|
||||||
<div className="col-span-2">
|
<div className="col-span-2">
|
||||||
@@ -1314,7 +1314,7 @@ export function StorageOverview() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Observations Section */}
|
{/* Observations Section */}
|
||||||
{(diskObservations.length > 0 || loadingObservations) && (
|
{(diskObservations.length > 0 || loadingObservations || (selectedDisk.observations_count ?? 0) > 0) && (
|
||||||
<div className="border-t pt-4">
|
<div className="border-t pt-4">
|
||||||
<h4 className="font-semibold mb-2 flex items-center gap-2">
|
<h4 className="font-semibold mb-2 flex items-center gap-2">
|
||||||
<Info className="h-4 w-4 text-blue-400" />
|
<Info className="h-4 w-4 text-blue-400" />
|
||||||
|
|||||||
@@ -804,6 +804,13 @@ class JournalWatcher:
|
|||||||
raw_message=raw_msg,
|
raw_message=raw_msg,
|
||||||
severity='warning',
|
severity='warning',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Also update worst_health so the disk stays marked as warning
|
||||||
|
# even if current SMART readings show 0 pending sectors
|
||||||
|
warn_line_text = warn_line_m.group(1).strip() if warn_line_m else error_signature
|
||||||
|
health_persistence.update_disk_worst_health(
|
||||||
|
base_dev, serial, 'warning', warn_line_text
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"[DiskIOEventProcessor] Error recording smartd observation: {e}")
|
print(f"[DiskIOEventProcessor] Error recording smartd observation: {e}")
|
||||||
|
|
||||||
@@ -1795,6 +1802,18 @@ class PollingCollector:
|
|||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# Skip recovery notifications for SMART disk errors (pending/reallocated sectors).
|
||||||
|
# These indicate physical disk degradation that doesn't truly "recover" --
|
||||||
|
# the disk may show 0 pending sectors later but the damage history persists.
|
||||||
|
# The worst_health in disk_registry tracks this, so we don't send false "resolved".
|
||||||
|
if category == 'disks':
|
||||||
|
reason_lower = reason.lower() if reason else ''
|
||||||
|
if any(indicator in reason_lower for indicator in [
|
||||||
|
'pending', 'reallocated', 'sector', 'smart', 'unreadable'
|
||||||
|
]):
|
||||||
|
self._last_notified.pop(key, None)
|
||||||
|
continue
|
||||||
|
|
||||||
# Calculate duration
|
# Calculate duration
|
||||||
duration = ''
|
duration = ''
|
||||||
if first_seen:
|
if first_seen:
|
||||||
|
|||||||
Reference in New Issue
Block a user