feat(novel-crawl): 新增磁盘保护机制,支持邮件告警与自动熔断

- 实现定时检测磁盘使用率,避免爬虫耗尽磁盘资源
- 当磁盘使用率达到 85%、90%、95% 时,分别发送告警邮件
- 当使用率达到 95% 时,强制停止当前爬虫进程
This commit is contained in:
xiongxiaoyang
2025-10-24 19:04:50 +08:00
parent 0279a86e56
commit 938ae8571d
8 changed files with 351 additions and 1 deletions

View File

@@ -28,6 +28,41 @@ crawl:
max: 500
---
#邮箱服务器
spring:
mail:
host: smtp.163.com
#发件人昵称
nickname: novel-plus
#邮箱账户
username: xxyopen@163.com
#邮箱第三方授权码
password: novel123456
#编码类型
default-encoding: UTF-8
port: 465
properties:
mail:
smtp:
auth: true
starttls:
enable: true
required: rue
socketFactory:
port: 465
class: javax.net.ssl.SSLSocketFactory
fallback: false
# 磁盘监控配置
disk-monitor:
enabled: false
interval-minutes: 5
warning-threshold: 85.0
severe-threshold: 90.0
critical-threshold: 95.0
# 告警邮件接收人列表支持多个邮箱
recipients: xxyopen@foxmail.com,12345678@qq.com