diff --git a/AppImage/scripts/health_monitor.py b/AppImage/scripts/health_monitor.py index 39bb1f18..2f837e29 100644 --- a/AppImage/scripts/health_monitor.py +++ b/AppImage/scripts/health_monitor.py @@ -2882,21 +2882,21 @@ class HealthMonitor: continue vm_name = self._resolve_vm_name(vmid) - display = f"VM {vmid} ({vm_name})" if vm_name else f"VM {vmid}" - error_key = f'vm_{vmid}' - if error_key not in vm_details: - rec_result = health_persistence.record_error( - error_key=error_key, - category='vms', - severity='WARNING', - reason=f'{display}: QMP command failed or timed out.\n{line.strip()[:200]}', - details={'id': vmid, 'vmname': vm_name, 'type': 'VM'} - ) - if not rec_result or rec_result.get('type') != 'skipped_acknowledged': - issues.append(f'{display}: QMP communication issue') - vm_details[error_key] = { - 'status': 'WARNING', - 'reason': f'{display}: QMP command failed or timed out', + display = f"VM {vmid} ({vm_name})" if vm_name else f"VM {vmid}" + error_key = f'vm_{vmid}' + if error_key not in vm_details: + rec_result = health_persistence.record_error( + error_key=error_key, + category='vms', + severity='WARNING', + reason=f'{display}: QMP command failed or timed out.\n{line.strip()[:200]}', + details={'id': vmid, 'vmname': vm_name, 'type': 'VM'} + ) + if not rec_result or rec_result.get('type') != 'skipped_acknowledged': + issues.append(f'{display}: QMP communication issue') + vm_details[error_key] = { + 'status': 'WARNING', + 'reason': f'{display}: QMP command failed or timed out', 'id': vmid, 'vmname': vm_name, 'type': 'VM' diff --git a/AppImage/scripts/test_real_events.sh b/AppImage/scripts/test_real_events.sh index b9b9a49e..8e377f76 100644 --- a/AppImage/scripts/test_real_events.sh +++ b/AppImage/scripts/test_real_events.sh @@ -557,7 +557,7 @@ test_vmct() { test_system() { header "SYSTEM EVENT TESTS (syslog injection)" - # ��─ Test S1: Authentication failures ── + # ── Test S1: Authentication failures ── log "" log "${BOLD} Test S1: SSH auth failure injection${NC}" info "Injecting SSH auth failure messages into syslog."