mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-02 19:02:31 +00:00
fix(monitor): the observation history of a disk is permanent
- An observation is never left out for its age and cannot be dismissed: the rule that hid it after 30 days without a repetition, and the clean-up that marked the ones of a missing device, are removed. - The ones earlier versions left out are shown again; an error that came back while hidden appears with its first date and its full count. - The audit attributes recorded events to a disk by its serial number.
This commit is contained in:
@@ -3268,15 +3268,12 @@ def _disk_errors(ctx):
|
||||
"""
|
||||
records = _recorded_disk_events()
|
||||
if not records:
|
||||
# An empty store and a store whose entries were all dismissed
|
||||
# look the same from here, and neither supports the claim that
|
||||
# no disk reported an error. Saying which of the two it is is
|
||||
# not possible; saying there is nothing to grade is.
|
||||
# An empty store does not support the claim that no disk ever
|
||||
# reported an error: the monitor may not have been running when
|
||||
# one did. Saying there is nothing to grade is what can be said.
|
||||
return {"classification": CLASS_NOT_APPLICABLE,
|
||||
"summary_key": "noEvents",
|
||||
"evidence": "The health monitor holds no undismissed disk "
|
||||
"event. A dismissed observation is dropped by "
|
||||
"the monitor and is not read back here."}
|
||||
"evidence": "The health monitor holds no disk event."}
|
||||
|
||||
now = time.time()
|
||||
recent_days = ctx.policy.threshold("disk_error_recent_days")
|
||||
@@ -3316,9 +3313,8 @@ def _disk_errors(ctx):
|
||||
evidence += ("\nRecorded because Linux reported them; neither SMART nor "
|
||||
"Proxmox surfaces these, and both may report the device as "
|
||||
"healthy. Stated as separate warnings without overriding "
|
||||
"that current health result. Events the reader dismissed are not "
|
||||
"listed: the "
|
||||
"monitor drops them and this reads what the monitor keeps. "
|
||||
"that current health result. Every recorded event is "
|
||||
"listed: the history of a disk is permanent. "
|
||||
"Recorded by the health monitor as events occurred. SMART "
|
||||
"reports the device's present opinion of itself and is read "
|
||||
"by a separate check; a device can report healthy while its "
|
||||
|
||||
Reference in New Issue
Block a user