加入日志

This commit is contained in:
liuwei
2025-05-27 09:22:38 +08:00
parent d9645c7144
commit 854bd1515a

View File

@@ -25,6 +25,7 @@ class GlancesMonitor:
"""
self.host = host
self.port = port
self.api_url = f"http://{self.host}:{self.port}/api/3"
self.cpu_threshold = cpu_threshold
self.load_threshold = load_threshold or (self.get_cpu_count() * 2)
self.io_threshold = io_threshold
@@ -33,7 +34,6 @@ class GlancesMonitor:
self.email_sender = email_sender
self.recipient = recipient
self.glances_process = None
self.api_url = f"http://{self.host}:{self.port}/api/3"
self.last_alert_times = {}
self._running = False