mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-05-01 11:56:21 +00:00
Update health_monitor.py
This commit is contained in:
@@ -2190,22 +2190,22 @@ class HealthMonitor:
|
|||||||
'reason': f'{unique_critical_count} critical error(s) found', 'dismissable': False},
|
'reason': f'{unique_critical_count} critical error(s) found', 'dismissable': False},
|
||||||
}
|
}
|
||||||
|
|
||||||
# Track which sub-checks were dismissed
|
# Track which sub-checks were dismissed
|
||||||
dismissed_keys = set()
|
dismissed_keys = set()
|
||||||
for err_key, info in log_sub_checks.items():
|
for err_key, info in log_sub_checks.items():
|
||||||
if info['active']:
|
if info['active']:
|
||||||
is_dismissable = info.get('dismissable', True)
|
is_dismissable = info.get('dismissable', True)
|
||||||
result = health_persistence.record_error(
|
result = health_persistence.record_error(
|
||||||
error_key=err_key,
|
error_key=err_key,
|
||||||
category='logs',
|
category='logs',
|
||||||
severity=info['severity'],
|
severity=info['severity'],
|
||||||
reason=info['reason'],
|
reason=info['reason'],
|
||||||
details={'dismissable': is_dismissable}
|
details={'dismissable': is_dismissable}
|
||||||
)
|
)
|
||||||
if result and result.get('type') == 'skipped_acknowledged':
|
if result and result.get('type') == 'skipped_acknowledged':
|
||||||
dismissed_keys.add(err_key)
|
dismissed_keys.add(err_key)
|
||||||
elif health_persistence.is_error_active(err_key):
|
elif health_persistence.is_error_active(err_key):
|
||||||
health_persistence.clear_error(err_key)
|
health_persistence.clear_error(err_key)
|
||||||
|
|
||||||
# Build checks dict - downgrade dismissed items to INFO
|
# Build checks dict - downgrade dismissed items to INFO
|
||||||
def _log_check_status(key, active, severity):
|
def _log_check_status(key, active, severity):
|
||||||
|
|||||||
Reference in New Issue
Block a user