mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-18 10:02:16 +00:00
Update notification_events.py
This commit is contained in:
@@ -1927,27 +1927,27 @@ class ProxmoxHookWatcher:
|
|||||||
if pve_type == 'package-updates':
|
if pve_type == 'package-updates':
|
||||||
return 'update_available', 'node', ''
|
return 'update_available', 'node', ''
|
||||||
|
|
||||||
if pve_type == 'system-mail':
|
if pve_type == 'system-mail':
|
||||||
# Parse smartd messages to extract useful info and filter noise.
|
# Parse smartd messages to extract useful info and filter noise.
|
||||||
# smartd sends system-mail when it detects SMART issues.
|
# smartd sends system-mail when it detects SMART issues.
|
||||||
msg_lower = (message or '').lower()
|
msg_lower = (message or '').lower()
|
||||||
title_lower_sm = (title or '').lower()
|
title_lower_sm = (title or '').lower()
|
||||||
|
|
||||||
# ── Filter smartd noise ──
|
# ── Filter smartd noise ──
|
||||||
# FailedReadSmartErrorLog: smartd can't read the error log -- this is
|
# FailedReadSmartErrorLog: smartd can't read the error log -- this is
|
||||||
# a firmware quirk on some WD/Seagate drives, NOT a disk failure.
|
# a firmware quirk on some WD/Seagate drives, NOT a disk failure.
|
||||||
# FailedReadSmartData: similar firmware issue.
|
# FailedReadSmartData: similar firmware issue.
|
||||||
# These should NOT generate notifications.
|
# These should NOT generate notifications.
|
||||||
smartd_noise = [
|
smartd_noise = [
|
||||||
'failedreadsmarterrorlog',
|
'failedreadsmarterrorlog',
|
||||||
'failedreadsmartdata',
|
'failedreadsmartdata',
|
||||||
'failedopendevice', # drive was temporarily unavailable
|
'failedopendevice', # drive was temporarily unavailable
|
||||||
]
|
]
|
||||||
for noise in smartd_noise:
|
for noise in smartd_noise:
|
||||||
if noise in title_lower_sm or noise in msg_lower:
|
if noise in title_lower_sm or noise in msg_lower:
|
||||||
return '_skip', '', ''
|
return '_skip', '', ''
|
||||||
|
|
||||||
return 'system_mail', 'node', ''
|
return 'system_mail', 'node', ''
|
||||||
|
|
||||||
# ── Fallback for unknown/empty pve_type ──
|
# ── Fallback for unknown/empty pve_type ──
|
||||||
# (e.g. test notifications, future PVE event types)
|
# (e.g. test notifications, future PVE event types)
|
||||||
|
|||||||
Reference in New Issue
Block a user