From 04564bc9cf78cfafcd0cd32ff5c923de5f45d49f Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sun, 22 Mar 2026 14:57:46 +0100 Subject: [PATCH] Update health_monitor.py --- AppImage/scripts/health_monitor.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/AppImage/scripts/health_monitor.py b/AppImage/scripts/health_monitor.py index eb032961..a629616f 100644 --- a/AppImage/scripts/health_monitor.py +++ b/AppImage/scripts/health_monitor.py @@ -4014,13 +4014,13 @@ class HealthMonitor: self._journalctl_24h_cache = {'count': failed_logins, 'time': current_time} if failed_logins > 50: - msg = f'{failed_logins} failed login attempts in 24h' - issues.append(msg) - checks['login_attempts'] = {'status': 'WARNING', 'detail': msg, 'count': failed_logins, 'dismissable': True} - elif failed_logins > 0: - checks['login_attempts'] = {'status': 'OK', 'detail': f'{failed_logins} failed attempts in 24h (within threshold)', 'count': failed_logins} - else: - checks['login_attempts'] = {'status': 'OK', 'detail': 'No failed login attempts in 24h', 'count': 0} + msg = f'{failed_logins} failed login attempts in 24h' + issues.append(msg) + checks['login_attempts'] = {'status': 'WARNING', 'detail': msg, 'count': failed_logins, 'dismissable': True} + elif failed_logins > 0: + checks['login_attempts'] = {'status': 'OK', 'detail': f'{failed_logins} failed attempts in 24h (within threshold)', 'count': failed_logins} + else: + checks['login_attempts'] = {'status': 'OK', 'detail': 'No failed login attempts in 24h', 'count': 0} except Exception: checks['login_attempts'] = {'status': 'OK', 'detail': 'Unable to check login attempts'}