diff --git a/admin/GlancesMonitor.py b/admin/GlancesMonitor.py index d3083e7..e892448 100644 --- a/admin/GlancesMonitor.py +++ b/admin/GlancesMonitor.py @@ -6,7 +6,7 @@ import requests from loguru import logger class GlancesMonitor: - def __init__(self, email_sender, host='localhost', port=61208, + def __init__(self, email_sender, host='127.0.0.1', port=61208, cpu_threshold=80.0, load_threshold=None, io_threshold=80.0, disk_usage_threshold=60.0, handle_threshold=20000, recipient=None): diff --git a/main.py b/main.py index 95516e0..18ceabd 100644 --- a/main.py +++ b/main.py @@ -72,7 +72,7 @@ def main(): # 初始化 Glances 监控 monitor = GlancesMonitor( email_sender=robot.email_sender, - host='0.0.0.0', + host='127.0.0.1', port=61208, cpu_threshold=80.0, load_threshold=None, # 自动设为 CPU 核心数 * 2