mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-29 06:25:58 +00:00
Update health_monitor.py
This commit is contained in:
@@ -3898,14 +3898,14 @@ class HealthMonitor:
|
|||||||
|
|
||||||
# Sub-check 3: Failed login attempts (brute force detection)
|
# Sub-check 3: Failed login attempts (brute force detection)
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
['journalctl', '--since', '24 hours ago', '--no-pager',
|
['journalctl', '--since', '24 hours ago', '--no-pager',
|
||||||
'-g', 'authentication failure|failed password|invalid user',
|
'-g', 'authentication failure|failed password|invalid user',
|
||||||
'--output=cat', '-n', '5000'],
|
'--output=cat', '-n', '5000'],
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=True,
|
text=True,
|
||||||
timeout=5
|
timeout=5
|
||||||
)
|
)
|
||||||
|
|
||||||
failed_logins = 0
|
failed_logins = 0
|
||||||
if result.returncode == 0:
|
if result.returncode == 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user