监控优化
This commit is contained in:
@@ -5,6 +5,7 @@ import requests
|
|||||||
|
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
|
|
||||||
class GlancesMonitor:
|
class GlancesMonitor:
|
||||||
def __init__(self, email_sender, host='192.168.2.170', port=61208,
|
def __init__(self, email_sender, host='192.168.2.170', port=61208,
|
||||||
cpu_threshold=80.0, load_threshold=None, io_threshold=80.0,
|
cpu_threshold=80.0, load_threshold=None, io_threshold=80.0,
|
||||||
|
|||||||
2
main.py
2
main.py
@@ -76,7 +76,7 @@ def main():
|
|||||||
port=config.glances.get("port"),
|
port=config.glances.get("port"),
|
||||||
cpu_threshold=80.0,
|
cpu_threshold=80.0,
|
||||||
load_threshold=None, # 自动设为 CPU 核心数 * 2
|
load_threshold=None, # 自动设为 CPU 核心数 * 2
|
||||||
io_threshold=80.0,
|
io_threshold=100.0,
|
||||||
disk_usage_threshold=60.0,
|
disk_usage_threshold=60.0,
|
||||||
handle_threshold=20000,
|
handle_threshold=20000,
|
||||||
recipient=config.email.get("alert_recipient")
|
recipient=config.email.get("alert_recipient")
|
||||||
|
|||||||
Reference in New Issue
Block a user