加入日志

This commit is contained in:
liuwei
2025-05-27 09:19:08 +08:00
parent 41211d75c5
commit e335fb1c38
2 changed files with 2 additions and 2 deletions

View File

@@ -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):

View File

@@ -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