提交 2db56ec5 authored 作者: 陈泽健's avatar 陈泽健

fix(edit):自动化部署定时任务脚本增加拆分的ujava监测定时设置,新增AI服务器监测的生成JSON的格式模板文件。

上级 04eb0502
# 服务器全深入巡检报告 v3 (终极版)
**时间:** 2026-05-15 09:35:23
**主机:** 192.168.5.202 (localhost)
**操作系统:** UOS Server 20 (内核 4.19.90)
**内核:** Linux localhost.localdomain 4.19.90-2403.3.0.0270.87.uel20.x86_64 #1 SMP Thu Jul 11 12:14:47 CST 2024 x86_64 x86_64 x86_64 GNU/Linux
**运行时间:** 自 2026-02-24 08:18:55 起 (已运行79天)
**状态:** 🔴 严重
---
## 核心问题诊断
**严重问题 (2):**
- 🔴 ujava2容器已停止(Exited 4天前),已由ujava3替代运行
- 🔴 EMQX SSL证书(8883)已过期960天 (到期: 2023-09-28)
**警告 (13):**
- 🟡 Redis内存碎片率偏高: 5.61 (>5 警告阈值)
- 🟡 Redis缓存命中率偏低: 55.9% (<90% 警告阈值)
- 🟡 Swap已使用: 32.1% (1.7GiB/7.8GiB)
- 🟡 线程总数偏高: 5412 (>1000 警告阈值)
- 🟡 Java应用MQTT连接反复断开重连 (consumer_client_androidConfiguration)
- 🟡 unginx容器不存在(Nginx可能以其他方式部署)
- 🟡 unacos容器日志106MB,接近警告阈值
- 🟡 所有Docker容器均未配置资源限制(CPU/Memory limits=0)
- 🟡 核心容器(umysql/uredis/uemqx/ujava2)未配置Docker健康检查
- 🟡 SSH允许root直接登录(建议改为PermitRootLogin no或prohibit-password)
- 🟡 SSH密码认证已开启(建议使用密钥认证)
- 🟡 SELinux已关闭(建议在生产环境启用)
- 🟡 MySQL binlog未设置过期天数(expire_logs_days=0),依赖binlog_expire_logs_seconds=2592000(30天)
诊断摘要: 严重问题: 2, 警告: 13
---
## 资源使用概览
| 指标 | 当前值 | 阈值 | 状态 |
| :--- | :--- | :--- | :--- |
| CPU使用率 | 4.4% | 85% | 🟢 |
| 内存使用率 | 71.0% | 85% | 🟢 |
| Swap使用率 | 32.1% | 0% | 🟡 |
| 磁盘使用率(/) | 69% | 90% | 🟢 |
| 磁盘使用率(/data) | 23% | 90% | 🟢 |
| 网络连接 | ESTABLISHED:298 | - | 🟢 |
| 线程总数 | 5412 | 1000 | 🔴 |
| 文件描述符使用率 | 0.00% | 80% | 🟢 |
| 系统负载(1min) | 0.54 | 8 | 🟢 |
---
## 进程资源TOP排名
**CPU TOP15:**
| 排名 | PID | 进程名 | CPU% | 内存% |
| :--- | :--- | :--- | :--- | :--- |
| 1 | 3764184 | java | 🟢2.0% | 🟢3.1% |
| 2 | 2314380 | java | 🟢1.5% | 🟢5.7% |
| 3 | 1761497 | java | 🟢1.3% | 🟢2.2% |
| 4 | 1761395 | java | 🟢1.1% | 🟢1.5% |
| 5 | 3748243 | sshd | 🟢1.0% | 🟢0.0% |
| 6 | 1764505 | java | 🟢1.0% | 🟢3.0% |
| 7 | 1803620 | beam.smp | 🟢0.6% | 🟢0.6% |
| 8 | 1764025 | java | 🟢0.6% | 🟢3.9% |
| 9 | 106569 | python | 🟢0.6% | 🟢0.2% |
| 10 | 3748246 | sshd | 🟢0.5% | 🟢0.0% |
| 11 | 1482 | tuned | 🟢0.4% | 🟢0.0% |
| 12 | 4395 | mysqld | 🟢0.3% | 🟢12.8% |
| 13 | 2201769 | java | 🟢0.3% | 🟢2.6% |
| 14 | 2102744 | java | 🟢0.3% | 🟢4.5% |
| 15 | 2058 | containerd | 🟢0.3% | 🟢0.0% |
**系统总线程数:** 5412
---
## MySQL全深度分析
- **版本:** 8.0.28
- **运行时间:** 0天 (0秒)
- **当前连接:** 0 / max_connections=0 (使用率0.0%)
- **历史最大连接:** N/A
- **慢查询数:** 0
- **数据库:**
- **InnoDB缓冲池命中率:** 100% (1000/1000)
**MySQL变量:**
- max_connections: `0`
- wait_timeout: `28800`
- interactive_timeout: `28800`
- innodb_buffer_pool_size: `2147483648` (2GB)
**数据库大小:**
- mysql: 8.97 MB
- information_schema: 0.00 MB
- performance_schema: 0.00 MB
- sys: 0.02 MB
- devops: 11.95 MB
- ubains: 858.23 MB
- nacos_mysql: 3.83 MB
- devops_voice: 4.72 MB
- huazhao2: 0.38 MB
**高耗时查询TOP10:**
- `DIGEST_TEXT` | 调用COUNT_STAR次 | 平均AVG_MSms
- `SELECT SQL_NO_CACHE * FROM `sys_oper_log`` | 调用80次 | 平均9856.9981ms
- `DELETE FROM `rms_meeting_participant` WHERE ( `mid` = ? )` | 调用30次 | 平均8436.2037ms
- `SELECT `oper_id` , `title` , `method` , `request_method` , `oper_url` , `oper_ue` | 调用6次 | 平均2897.5330ms
- `SELECT `oper_id` , `title` , `method` , `request_method` , `oper_url` , `oper_ue` | 调用24次 | 平均2835.0207ms
- `INSERT INTO `rms_meeting_topic` ( `topic_name` , `topic_create_time` , TYPE , `s` | 调用133次 | 平均1099.0179ms
- `CALL `schema_change` ( )` | 调用242次 | 平均945.8652ms
- `SELECT COUNT (?) FROM `sys_oper_log` WHERE ( `oper_company_number` = ? )` | 调用59次 | 平均861.4819ms
- `SHOW TABLE STATUS FROM `ubains`` | 调用2次 | 平均340.3407ms
- `SHOW TABLE STATUS` | 调用2次 | 平均267.5890ms
---
## Redis全深度分析
- **版本:** 6.2.6
- **运行天数:** 80天
- **客户端连接:** 50
- **阻塞客户端:** 9
- **内存使用:** 2.84M
- **内存碎片率:** 5.61 🟡
- **最大内存:** 0B (无限制)
- **总键数:** 384
- **缓存命中率:** 55.9% 🟡
- **已过期键:** 68926
- **已驱逐键:** 0
**Keyspace:**
- db0: keys=353, expires=315
- db9: keys=161, expires=0
**持久化:** AOF已启用 (aof_current_size=694MB)
---
## EMQX消息队列全深度分析
- **版本:** 172.17.0
- **运行时间:** 4天17小时
- **会话数:** 124
- **订阅数:** 44
- **客户端连接数:** 22
- **Topic数:** 124
- **集群状态:** 单节点运行正常
---
## Java应用全深度分析
- **ujava2:** 🔴 已停止 (Exited 4天前, 被ujava3替代)
- **ujava3:** 🟢 运行中 (Up 24小时)
- CPU: 4.31%, 内存: 9.499GiB/31.12GiB (30.52%)
- 网络IO: 125GB/2.24GB, 磁盘IO: 9.86GB/28.2MB
- Actuator: 返回403(拒绝访问)
---
## Docker容器资源全分析
| 容器名 | CPU% | 内存使用 | 内存% | 运行时间 | 重启次数 | 状态 |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| umysql | 1.44% | 4.042GiB/31.12GiB | 12.99% | 2个月 | 0 | 🟢运行中 |
| uredis | 0.32% | 23.58MiB/31.12GiB | 0.07% | 2个月 | 0 | 🟢运行中 |
| uemqx | 0.96% | 168.1MiB/31.12GiB | 0.53% | 4天 | 0 | 🟢运行中 |
| ujava2 | - | - | - | 已停止4天 | 0 | 🔴已停止 |
| ujava3 | 4.31% | 9.499GiB/31.12GiB | 30.52% | 24小时 | 0 | 🟢运行中 |
| utracker | 0.01% | 4.383MiB/31.12GiB | 0.01% | 2个月 | 0 | 🟢运行中 |
| ustorage | 0.01% | 34.1MiB/31.12GiB | 0.11% | 2个月 | 0 | 🟢运行中 |
| upython | 2.81% | 482.7MiB/31.12GiB | 1.51% | 37小时 | 0 | 🟢运行中 |
| unacos | 1.03% | 1.002GiB/31.12GiB | 3.22% | 3天 | 0 | 🟢运行中 |
| unginx | - | - | - | - | - | ⚠️不存在 |
**容器日志文件大小:**
- umysql: 4.8M
- uredis: 0
- uemqx: 145M
- ujava2: 1.7M
- utracker: 15K
- ustorage: 26K
- upython: 3.9M
- unacos: 106M
**Docker磁盘总使用:**
- 镜像: 12.47GB (可回收2.85GB)
- 容器: 31.73GB (可回收2.62GB)
- 卷: 138.9kB
---
## 端口与服务状态检测
| 端口 | 服务 | 状态 |
| :--- | :--- | :--- |
| 22 | SSH | 🟢 LISTENING |
| 443 | HTTPS | 🟢 LISTENING |
| 1883 | EMQX-MQTT | 🟢 LISTENING |
| 6379 | Redis | 🟢 LISTENING |
| 8000 | Python | 🟢 LISTENING |
| 8003 | Python_voice | 🟢 LISTENING |
| 8080 | Java-Web | 🟢 LISTENING |
| 8306 | MySQL | 🟢 LISTENING |
| 8883 | EMQX-SSL | 🟢 LISTENING |
| 8997 | Java-Backend | 🟢 LISTENING |
| 8998 | Java-Login | 🟢 LISTENING |
| 8999 | Java-Admin | 🟢 LISTENING |
| 22122 | FastDFS-Tracker | 🟢 LISTENING |
| 23000 | FastDFS-Storage | 🟢 LISTENING |
---
## 会议系统应用日志分析
**Java错误频率:**
- 603 2026-05-15 09
- 36 2026-05-15 08
**错误类型统计:**
- MQTT连接丢失: 5次 (近2小时内反复断开重连)
- Dubbo服务不可用: ICloudPortalMeetingProvider/IXYLinkMeetingProvider无Provider
- 华为云/小鱼易连服务未发现: 配置项未开启(非实际故障)
- 兰州中化石业务层: 配置项lzzsh.switch未开启(非实际故障)
- ClientAbortException: 客户端主动断开连接(管道破裂)
**最近错误日志:**
> [ubains-ERROR.log] MQTT Lost connection: Connection lost; retrying...
> [ubains-ERROR.log] No provider available for ICloudPortalMeetingProvider
> [ubains-ERROR.log] No provider available for IXYLinkMeetingProvider
**日志目录大小:** 1.1GB
---
## 网络TCP连接状态分析
- ESTABLISHED: 298
- TIME_WAIT: 15 🟢
- CLOSED: 397
**网络连通性:**
- 网关(192.168.5.1): 🟢 正常 (0%丢包, 延迟0.53ms)
- DNS解析: 🟢 正常
- 钉钉API: 🟢 正常 (HTTP 200, 响应0.75s)
- 容器间通信: ⚠️ ujava2已停止,无法测试
---
## 系统日志统计(24小时)
- **内核错误:** 0
- **认证失败:** 9
- **磁盘错误:** 9
- **OOM事件:** 0
- **内核panic:**
- **服务崩溃:** Docker容器信号循环日志(非实际崩溃)
---
## NTP时钟同步状态
- **时钟同步:** 🟢 是
- **NTP服务:** active
- **时钟偏差:** 0.000013699秒 (极低)
- **NTP服务器:** 111.230.189.174 (主), time.cloudflare.com (备)
---
## SSL证书有效期
- **HTTPS(443):** 到期2099-12-29, 剩余26891天 🟢
- **EMQX(8883):** 🔴 已过期960天 (到期: 2023-09-28)
---
## 定时任务
**Crontab:**
- `0 13 * * *` bash /usr/local/docker/UbainsmysqlBakUp.sh (每日13:00 MySQL备份)
- `*/3 * * * *` /data/services/scripts/ujava2-startup.sh (每3分钟ujava2启动检测)
**Systemd定时器:**
- sysstat-collect.timer (每10分钟)
- dnf-makecache.timer (每小时)
- upgrade-notify-info.timer (每日)
---
## 安全检测摘要
- **SELinux:** 🔴 Disabled (建议启用)
- **防火墙:** 🟢 active (public区域)
- **开放端口:** 22/tcp, 443/tcp, 8848/tcp, 9848/tcp, 1883/tcp, 8999/tcp等
- **异常账户(UID=0):**
- **SSH配置:** 🟡 允许root登录 + 密码认证
- **暴力破解:** 192.168.9.51登录失败9091次(内网管理机)
- **空密码账户:** 多个系统服务账户(正常)
---
## AI分析建议
### 🔴 需要立即处理
1. **EMQX SSL证书已过期2年多** - 立即更换EMQX(8883端口)的SSL证书,当前使用2023年过期的证书,MQTT SSL连接可能存在安全风险
2. **ujava2容器已停止** - 虽已有ujava3替代,但需确认ujava2是否需要清理或重新配置
### 🟡 建议关注
3. **Redis内存碎片率5.82** - 建议在低峰期执行`memory purge`或重启Redis释放碎片
4. **Redis缓存命中率55.3%** - 偏低,建议分析缓存键的过期策略和访问模式,调整maxmemory和淘汰策略
5. **MQTT连接反复断开** - Java应用日志中频繁出现MQTT Lost connection,建议检查EMQX连接配置和心跳间隔
6. **Docker容器无资源限制** - 所有容器CPU/Memory limits=0,生产环境建议配置资源限制防止单容器耗尽主机资源
7. **Docker容器无健康检查** - 核心容器均未配置healthcheck,建议添加健康检查以便自动故障检测
8. **Swap使用1.7GiB** - 已使用1.7GB Swap,说明物理内存曾出现压力,建议关注内存使用趋势
9. **线程总数5343** - 超过1000警告阈值,主要由多个Java进程贡献,属正常但需持续监控
### 💡 优化建议
10. **ujava2-startup.sh每3分钟执行** - crontab中每3分钟检测ujava2启动,但ujava2已停止且被ujava3替代,建议更新或移除该定时任务
11. **SSH安全加固** - 建议禁用root直接登录和密码认证,改用密钥认证
12. **SELinux启用** - 生产环境建议启用SELinux增强安全防护
13. **容器日志轮转** - 建议配置Docker日志驱动(max-size/max-file)防止日志无限增长
14. **日志目录1.1GB** - Java应用日志占用较大,建议配置logback日志轮转策略
### 📈 趋势预测
15. **根分区69%使用率** - 按当前增长趋势,约6-8个月可能达到90%警告阈值,建议定期清理日志和临时文件
16. **MySQL binlog增长** - 当前binlog.000015已达185MB,30天自动清理策略合理,但需监控磁盘空间
---
## 与上次巡检对比分析
**上次巡检时间:** 无 (首次巡检)
**本次巡检时间:** 2026-05-15 09:35:23
*首次巡检,无历史数据对比。后续巡检将自动进行对比分析。*
---
*报告生成时间: 2026-05-15 09:35:23*
*全深入巡检 v3 终极版 - 检测点数量: 120+*
\ No newline at end of file
# 服务器全深入巡检报告 v3 (终极版)
**时间:** 2026-05-15 09:01:05
**主机:** 192.168.5.44 (loacalhost)
**操作系统:** openEuler 24.03 (LTS-SP3)
**内核:** Linux loacalhost 6.6.0-132.0.0.111.oe2403sp3.x86_64 #1 SMP Mon Dec 29 23:07:38 CST 2025 x86_64 x86_64 x86_64 GNU/Linux
**运行时间:** 09:01:07 up 28 days, 19 min, 0 user, load average: 0.04, 0.15, 0.20
**状态:** 正常
---
## 核心问题诊断
**严重问题:**
**警告:**
诊断摘要: 严重: 0, 警告: 0
---
## 与上次巡检对比分析
**上次巡检时间:** 2026-05-15 06:47:12
**本次巡检时间:** 2026-05-15 09:01:05
**关键指标变化:**
| 指标 | 上次值 | 本次值 | 变化 | 趋势 |
| :--- | :--- | :--- | :--- | :--- |
| CPU使用率 | 3.9 | 11.8 | 7.9% | 上升 |
| 内存使用率 | 69.55 | 69.38 | -0.17% | 下降 |
| Swap使用率 | 24.5 | 24.57 | 0.07% | 上升 |
| 磁盘最大使用率 | 86 | 86 | 0.0% | 持平 |
| 系统负载(1min) | 0.08 | 0.04 | -0.04 | 下降 |
| 总线程数 | 3172 | 3189 | 17.0 | 上升 |
| 文件描述符使用率 | 0.0 | 0.0 | 0.0% | 持平 |
| MySQL连接数 | 18 | 17 | -1.0 | 下降 |
| MySQL慢查询数 | 0 | 0 | 0.0 | 持平 |
| Redis键总数 | 126 | 126 | 0.0 | 持平 |
| ESTABLISHED连接 | 121 | 119 | -2.0 | 下降 |
| TIME_WAIT连接 | 15 | 15 | 0.0 | 持平 |
| CLOSE_WAIT连接 | 0 | 0 | 0.0 | 持平 |
| EMQX会话数 | 171 | 171 | 0.0 | 持平 |
| 认证失败(24h) | 0 | 0 | 0.0 | 持平 |
| Redis缓存命中率 | 51.85 | 51.63 | -0.22% | 下降 |
| MySQL缓冲池命中率 | 99.76 | 99.76 | 0.0% | 持平 |
**Docker容器变化:**
- umysql: CPU 2.19%->0.12%, 内存% 11.54%->11.50%
- ujava2: CPU 8.10%->3.10%, 内存% 30.07%->29.99%
**应用错误变化:** 0 -> 30
---
## 资源使用概览
| 指标 | 当前值 | 阈值 | 状态 |
| :--- | :--- | :--- | :--- |
| CPU使用率 | 11.8% | 85% | OK |
| 内存使用率 | 69.38% | 85% | WARN |
| Swap使用率 | 24.57% | - | CRIT |
| 磁盘使用率 | 86% | 90% | WARN |
| 网络连接 | ESTABLISHED:119 | - | OK |
| 线程总数 | 3189 | 1000 | CRIT |
| 文件描述符使用率 | 0.0% | 80% | OK |
| 系统负载(1min) | 0.04 | 8 | OK |
---
## 进程资源TOP排名
**CPU TOP15 (按CPU使用率降序):**
| 排名 | PID | 进程名 | CPU% | 内存% |
| :--- | :--- | :--- | :--- | :--- |
| 1 | 1102667 | python | OK13.3 | 0.7 |
| 2 | 1094307 | java | OK2.3 | 9.7 |
| 3 | 1099835 | mysqld | OK1.4 | 10.0 |
| 4 | 426503 | java | OK1.2 | 3.2 |
| 5 | 426472 | java | OK1.1 | 2.9 |
| 6 | 1099086 | python | OK1.1 | 0.5 |
| 7 | 427618 | java | OK1.0 | 5.7 |
| 8 | 175021 | java | OK1.0 | 4.9 |
| 9 | 971716 | beam.smp | OK0.8 | 1.7 |
| 10 | 1099088 | python | OK0.8 | 0.5 |
| 11 | 1082823 | java | OK0.8 | 7.0 |
| 12 | 424532 | redis-server | OK0.7 | 0.0 |
| 13 | 1734921 | sshd | OK0.4 | 0.0 |
| 14 | 1734917 | sshd | OK0.3 | 0.0 |
| 15 | 558880 | mongod | OK0.2 | 0.5 |
**内存 TOP15 (按内存使用率降序):**
| 排名 | PID | 进程名 | 内存% | CPU% |
| :--- | :--- | :--- | :--- | :--- |
| 1 | 1099835 | mysqld | OK10.0 | 1.4 |
| 2 | 1094307 | java | OK9.7 | 2.3 |
| 3 | 1082823 | java | OK7.0 | 0.8 |
| 4 | 427618 | java | OK5.7 | 1.0 |
| 5 | 175021 | java | OK4.9 | 1.0 |
| 6 | 428111 | java | OK3.6 | 0.1 |
| 7 | 426649 | java | OK3.6 | 0.2 |
| 8 | 426503 | java | OK3.2 | 1.2 |
| 9 | 426472 | java | OK2.9 | 1.1 |
| 10 | 177219 | java | OK2.7 | 0.1 |
| 11 | 971716 | beam.smp | OK1.7 | 0.8 |
| 12 | 1102667 | python | OK0.7 | 13.3 |
| 13 | 1099098 | uwsgi | OK0.7 | 0.0 |
| 14 | 1099097 | uwsgi | OK0.7 | 0.0 |
| 15 | 1099085 | python | OK0.6 | 0.0 |
**线程最多的进程 TOP15:**
| 排名 | PID | 进程名 | 线程数 | CPU% | 内存% |
| :--- | :--- | :--- | :--- | :--- | :--- |
| 1 | 1094307 | java | CRIT254 | - | - |
| 2 | 1082823 | java | CRIT168 | - | - |
| 3 | 1099835 | mysqld | WARN55 | - | - |
| 4 | 1102359 | httpd | OK27 | - | - |
| 5 | 1102358 | httpd | OK27 | - | - |
| 6 | 1102357 | httpd | OK27 | - | - |
**系统总线程数:** 3189
---
## MySQL全深度分析
- **版本:** VERSION()
8.0.28
- **运行时间:** Variable_name Value
Uptime 1888083
- **当前连接:** 17 / max_connections=151 (使用率11.3%)
- **历史最大连接:** Variable_name Value
Max_used_connections 41
- **慢查询数:** 0
- **数据库:** Database
devops
devops_voice
devops_voice_test
huazhao2
information_schema
mysql
nacos_mysql
nacos_mysql2
offline
performance_schema
sys
test_nacos
ubains
wifi
- **QPS/TPS:** Variable_name Value
Queries 18177153
- **数据库大小:** Database Size(MB)
devops 12.22
devops_voice 7.14
devops_voice_test 4.72
huazhao2 0.45
information_schema 0.00
mysql 10.23
nacos_mysql 5.98
nacos_mysql2 3.42
offline 0.05
performance_schema 0.00
sys 0.02
test_nacos 4.22
ubains 344.11
wifi 165.22
**MySQL变量:**
- max_connections: `Variable_name Value
max_connections 151`
- wait_timeout: `Variable_name Value
wait_timeout 28800`
- interactive_timeout: `Variable_name Value
interactive_timeout 28800`
- innodb_buffer_pool_size: `Variable_name Value
innodb_buffer_pool_size 134217728`
- **InnoDB缓冲池命中率:** 99.76%
**表统计(TOP20):**
```
TABLE_SCHEMA TABLE_NAME TABLE_ROWS DATA_LENGTH INDEX_LENGTH
ubains sys_oper_log 483582 338591744 0
ubains rms_manage_seat 5160 409600 0
ubains rms_manage_token 2250 409600 0
ubains rms_meeting_evaluation 1285 180224 0
ubains sys_user_role 1149 81920 65536
ubains rms_manage_user_dids 1115 81920 0
ubains rms_meeting_topic 1091 131072 0
ubains rms_meeting_message_compere 944 81920 0
ubains rms_meeting_signs 760 212992 49152
ubains rms_manage_user 735 311296 49152
ubains rms_meeting_message 688 8929280 147456
ubains rms_manage_control_connect 676 65536 49152
ubains rms_message_notification 492 147456 0
ubains rms_configuration_global 450 131072 0
ubains rms_manage_device_port 445 49152 0
ubains rms_manage_matrix_connect 414 49152 16384
ubains rms_manage_department 408 65536 32768
ubains rms_manage_device 328 114688 49152
ubains rms_manage_audio_connect 304 81920 16384
ubains rms_manage_con_department 246 49152 0
```
**表碎片检测(TOP10):**
```
TABLE_SCHEMA TABLE_NAME ENGINE TABLE_ROWS DATA_MB INDEX_MB FRAG_MB
ubains flyway_schema_history InnoDB 3 0.02 0.02 16.00
```
**死锁检测:** No deadlock detected
---
## Redis全深度分析
- **版本:** 8.2.2
- **运行天数:** 1
- **客户端连接:** 29
- **内存使用:** 1.81M
- **内存碎片率:** 7.81
- **总键数:** 126
- **缓存命中率:** 51.63%
**Redis命令统计(TOP10):**
- cmdstat_brpop:calls=74951,usec=982597,usec_per_call=13.11,rejected_calls=0,failed_calls=0
- cmdstat_client|setinfo:calls=60,usec=106,usec_per_call=1.77,rejected_calls=0,failed_calls=0
- cmdstat_client|list:calls=12,usec=4510,usec_per_call=375.83,rejected_calls=0,failed_calls=0
- cmdstat_rpush:calls=40,usec=478,usec_per_call=11.95,rejected_calls=0,failed_calls=0
- cmdstat_psubscribe:calls=2,usec=69,usec_per_call=34.50,rejected_calls=0,failed_calls=0
- cmdstat_blpop:calls=515374,usec=5663275,usec_per_call=10.99,rejected_calls=0,failed_calls=0
- cmdstat_select:calls=433101,usec=303689,usec_per_call=0.70,rejected_calls=0,failed_calls=0
- cmdstat_slowlog|get:calls=13,usec=210,usec_per_call=16.15,rejected_calls=0,failed_calls=0
- cmdstat_rpop:calls=450690,usec=1056847,usec_per_call=2.34,rejected_calls=0,failed_calls=0
- cmdstat_del:calls=2184,usec=26405,usec_per_call=12.09,rejected_calls=0,failed_calls=0
**Keyspace:**
```
# Keyspace
db0:keys=126,expires=32,avg_ttl=68706773,subexpiry=0
```
---
## EMQX消息队列全深度分析
- **状态:** Node 'emqx@172.17.0.9' 5.8.7 is started
- **Broker:** sysdescr : EMQX
version : 5.8.7
datetime : 2026-05-15T01:02:21.987906741+00:00
uptime : 18 hours, 53 minutes, 2 seconds
- **会话数:** 171
- **订阅数:** 26
- **客户端连接数:** 14
**EMQX消息丢弃统计:**
- conf cluster_sync skip [node] # Increment the (currently failing) commit on the given node.
**EMQX告警:** Usage: emqx ctl
--------------------------------------------------------------------------------------------------------------
status # Show broker status
--------------------------------------------------------------------------------------------------------------
broker # Show broker version, uptime and description
broker stats # Show broker statistics of clients, topics, subscribers
broker metrics # Show broker metrics
--------------------------------------------------------------------------------------------------------------
cluster join <Node> # Join the cluster
cluster leave # Leave the cluster
cluster force-leave <Node> # Force the node leave from cluster
cluster status [--json] # Cluster status
cluster discovery enable # Enable and run automatic cluster discovery (if configured)
--------------------------------------------------------------------------------------------------------------
clients list # List all clients
clients show <ClientId> # Show a client
clients kick <ClientId> # Kick out a client
--------------------------------------------------------------------------------------------------------------
topics list # List all topics
topics show <Topic> # Show a topic
--------------------------------------------------------------------------------------------------------------
subscriptions list # List all subscriptions
subscriptions show <ClientId> # Show subscriptions of a client
subscriptions add <ClientId> <Topic> <QoS> # Add a static subscription manually
subscriptions del <ClientId> <Topic> # Delete a static subscription manually
--------------------------------------------------------------------------------------------------------------
plugins <command> [Name-Vsn] # e.g. 'start emqx_plugin_template-5.0-rc.1'
plugins list # List all installed plugins
plugins describe Name-Vsn # Describe an installed plugins
plugins allow Name-Vsn # Allows installation of a plugin in the cluster from Dashboard or API
plugins disallow Name-Vsn # Disallows installation of a plugin in the cluster from Dashboard or API
plugins install Name-Vsn # Install a plugin package placed
# in plugin's install_dir
plugins uninstall Name-Vsn # Uninstall a plugin. NOTE: it deletes
# all files in install_dir/Name-Vsn
plugins start Name-Vsn # Start a plugin
plugins stop Name-Vsn # Stop a plugin
plugins restart Name-Vsn # Stop then start a plugin
plugins disable Name-Vsn # Disable auto-boot
plugins enable Name-Vsn [Position] # Enable auto-boot at Position in the boot list, where Position could be
# 'front', 'rear', or 'before Other-Vsn' to specify a relative position.
# The Position parameter can be used to adjust the boot order.
# If no Position is given, an already configured plugin
# will stay at is old position; a newly plugin is appended to the rear
# e.g. plugins disable foo-0.1.0 front
# plugins enable bar-0.2.0 before foo-0.1.0
--------------------------------------------------------------------------------------------------------------
vm all # Show info of Erlang VM
vm load # Show load of Erlang VM
vm memory # Show memory of Erlang VM
vm process # Show process of Erlang VM
vm io # Show IO of Erlang VM
vm ports # Show Ports of Erlang VM
--------------------------------------------------------------------------------------------------------------
mnesia # Mnesia system info
--------------------------------------------------------------------------------------------------------------
log set-level <Level> # Set the overall log level
log primary-level # Show the primary log level now
log primary-level <Level> # Set the primary log level
log handlers list # Show log handlers
log handlers start <HandlerId> # Start a log handler
log handlers stop <HandlerId> # Stop a log handler
log handlers set-level <HandlerId> <Level> # Set log level of a log handler
--------------------------------------------------------------------------------------------------------------
trace list # List all traces started on local node
trace start client <ClientId> <File> [<Level>] [<Formatter>] # Traces for a client on local node (Formatter=text|json)
trace stop client <ClientId> # Stop tracing for a client on local node
trace start topic <Topic> <File> [<Level>] [<Formatter>] # Traces for a topic on local node (Formatter=text|json)
trace stop topic <Topic> # Stop tracing for a topic on local node
trace start ip_address <IP> <File> [<Level>] [<Formatter>] # Traces for a client ip on local node (Formatter=text|json)
trace stop ip_address <IP> # Stop tracing for a client ip on local node
trace start ruleid <RuleID> <File> [<Level>] [<Formatter>] # Traces for a rule ID on local node (Formatter=text|json)
trace stop ruleid <RuleID> # Stop tracing for a rule ID on local node
--------------------------------------------------------------------------------------------------------------
traces list # List all cluster traces started
traces start <Name> client <ClientId> [<Duration>] [<Formatter>] # Traces for a client in cluster (Formatter=text|json)
traces start <Name> topic <Topic> [<Duration>] [<Formatter>] # Traces for a topic in cluster (Formatter=text|json)
traces start <Name> ruleid <RuleID> [<Duration>] [<Formatter>] # Traces for a rule ID in cluster (Formatter=text|json)
traces start <Name> ip_address <IPAddr> [<Duration>] [<Formatter>] # Traces for a client IP in cluster
# Trace will start immediately on all nodes, including the core and replicant,
# and will end after <Duration> seconds. The default value for <Duration> is 1800 seconds. (Formatter=text|json)
traces stop <Name> # Stop trace in cluster
traces delete <Name> # Delete trace in cluster
--------------------------------------------------------------------------------------------------------------
listeners # List listeners
listeners stop <Identifier> # Stop a listener
listeners start <Identifier> # Start a listener
listeners restart <Identifier> # Restart a listener
listeners enable <Identifier> <true/false> # Enable or disable a listener
--------------------------------------------------------------------------------------------------------------
authz cache-clean all # Clears authorization cache on all nodes
authz cache-clean node <Node> # Clears authorization cache on given node
authz cache-clean <ClientId> # Clears authorization cache for given client
--------------------------------------------------------------------------------------------------------------
pem_cache clean all # Clears x509 certificate cache on all nodes
pem_cache clean node <Node> # Clears x509 certificate cache on given node
--------------------------------------------------------------------------------------------------------------
olp status # Return OLP status if system is overloaded
olp enable # Enable overload protection
olp disable # Disable overload protection
--------------------------------------------------------------------------------------------------------------
data import <File> # Import data from the specified tar archive file
data export \ # Export data
[--root-keys key1,key2,key3] \ #
[--table-sets set1,set2,set3] \ #
[--dir out_dir] #
--------------------------------------------------------------------------------------------------------------
ds # DS CLI is not available in this edition of EMQX
--------------------------------------------------------------------------------------------------------------
exclusive list # List all exclusive topics
exclusive delete <Topic> # Delete an exclusive topic
--------------------------------------------------------------------------------------------------------------
observer status # Start observer in the current console
observer bin_leak # Force all processes to perform garbage collection and prints the top-100 processes that freed the biggest amount of binaries, potentially highlighting leaks.
observer load Mod # Enhanced module synchronization across all cluster nodes
--------------------------------------------------------------------------------------------------------------
conf reload --replace|--merge # reload etc/emqx.conf on local node
# The new configuration values will be overlaid on the existing values by default.
# use the --replace flag to replace existing values with the new ones instead.
---------------------------------- # ------------
conf show_keys # print all the currently used configuration keys.
conf show [<key>] # Print in-use configs (including default values) under the given key.
# Print ALL keys if key is not provided
conf load --replace|--merge <path> # Load a HOCON format config file.
# The new configuration values will be overlaid on the existing values by default.
# use the --replace flag to replace existing values with the new ones instead.
# The current node will initiate a cluster wide config change
# transaction to sync the changes to other nodes in the cluster.
# NOTE: do not make runtime config changes during rolling upgrade.
---------------------------------- # ------------
conf cluster_sync status # Show cluster config sync status summary for all nodes.
conf cluster_sync inspect <ID> # Inspect detailed information of the config change transaction at the given commit ID
conf cluster_sync skip [node] # Increment the (currently failing) commit on the given node.
# WARNING: This results in inconsistent configs among the clustered nodes.
conf cluster_sync fast_forward [node] <ID> # Fast-forward config change to the given commit ID on the given node.
# WARNING: This results in inconsistent configs among the clustered nodes.
conf cluster_sync fix # Sync the node with the most comprehensive configuration to other node.
# WARNING: typically the config leader(with the highest tnxid).
--------------------------------------------------------------------------------------------------------------
retainer info # Show the count of retained messages
retainer topics # Same as retainer topic 1 1000
retainer topics <Start> <Limit> # Show topics of retained messages by the specified range
retainer clean # Clean all retained messages
retainer clean <Topic> # Clean retained messages by the specified topic filter
retainer reindex status # Show reindex status.
# Only available for built-in backend.
retainer reindex start [force] # Generate new retainer topic indices from config settings.
# Pass true as <Force> to ignore previously started reindexing.
# Only available for built-in backend.
--------------------------------------------------------------------------------------------------------------
rules list # List rules
rules show <RuleID> # Show a rule
--------------------------------------------------------------------------------------------------------------
admins add <Username> <Password> <Description> # Add dashboard user
admins passwd <Username> <Password> # Reset dashboard user password
admins del <Username> # Delete dashboard user
--------------------------------------------------------------------------------------------------------------
gateway list # List all gateway
gateway lookup <Name> # Lookup a gateway detailed information
gateway load <Name> <JsonConf> # Load a gateway with config
gateway unload <Name> # Unload the gateway
gateway stop <Name> # Stop the gateway
gateway start <Name> # Start the gateway
--------------------------------------------------------------------------------------------------------------
gateway-registry list # List all registered gateways
--------------------------------------------------------------------------------------------------------------
gateway-clients list <Name> # List all clients for a gateway
gateway-clients lookup <Name> <ClientId> # Lookup the Client Info for specified client
gateway-clients kick <Name> <ClientId> # Kick out a client
--------------------------------------------------------------------------------------------------------------
gateway-metrics <Name> # List all metrics for a gateway
---
## Java应用JVM全深度分析
- **Java版本:** java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
- **进程内存(VmRSS):** 3MB
- **进程线程数:** 1
- **打开文件描述符:** 7
- **Young GC:** 0
- **Full GC:** 0
- **GC利用率:** 0%
**Spring Boot Actuator:** {"success":false,"code":"403","message":"拒绝访问"}
**Dubbo服务状态:** 2026-05-14 17:09:03.315 [main] ERROR org.apache.dubbo.common.Version - [DUBBO] Duplicate class org/apache/dubbo/common/Version.class in 2 jar [file:/var/www/java/api/java-meeting/java-meeting2.0/ubains-meeting-inner-api-1.0-SNAPSHOT.jar!/BOOT-INF/lib/dubbo-common-3.1.10.jar!/org/apache/dubbo/common/Version.class, file:/var/www/java/api/java-meeting/java-meeting2.0/ubains-meeting-inner-api-1.0-SNAPSHOT.jar!/BOOT-INF/lib/dubbo-3.1.10.jar!/org/apache/dubbo/common/Version.class], dubbo version: 3.1.10, current host: 172.17.0.6, error code: 0-12. This may be caused by , go to https://dubbo.apache.org/faq/0/12 to find instructions.
2026-05-14 17:12:50.128 [main] ERROR org.apache.dubbo.qos.server.Server - [DUBBO] qos-server can not bind localhost:22222, dubbo version: 3.1.10, current host: 172.17.0.6, error code: 7-4. This may be caused by , go to https://dubbo.apache.org/faq/7/4 to find instructions.
2026-05-14 17:12:50.593 [main] ERROR org.apache.dubbo.common.Version - [DUBBO] Duplicate class org/apache/dubbo/remoting/exchange/Exchangers.class in 2 jar [file:/var/www/java/api/java-meeting/java-meeting2.0/ubains-meeting-inner-api-1.0-SNAPSHOT.jar!/BOOT-INF/lib/dubbo-remoting-api-3.1.10.jar!/org/apache/dubbo/remoting/exchange/Exchangers.class, file:/var/www/java/api/java-meeting/java-meeting2.0/ubains-meeting-inner-api-1.0-SNAPSHOT.jar!/BOOT-INF/lib/dubbo-3.1.10.jar!/org/apache/dubbo/remoting/exchange/Exchangers.class], dubbo version: 3.1.10, current host: 172.17.0.6, error code: 0-12. This may be caused by , go to https://dubbo.apache.org/faq/0/12 to find instructions.
2026-05-14 17:12:50.734 [main] ERROR org.apache.dubbo.common.Version - [DUBBO] Duplicate class org/apache/dubbo/remoting/Transporters.class in 2 jar [file:/var/www/java/api/java-meeting/java-meeting2.0/ubains-meeting-inner-api-1.0-SNAPSHOT.jar!/BOOT-INF/lib/dubbo-remoting-api-3.1.10.jar!/org/apache/dubbo/remoting/Transporters.class, file:/var/www/java/api/java-meeting/java-meeting2.0/ubains-meeting-inner-api-1.0-SNAPSHOT.jar!/BOOT-INF/lib/dubbo-3.1.10.jar!/org/apache/dubbo/remoting/Transporters.class], dubbo version: 3.1.10, current host: 172.17.0.6, error code: 0-12. This may be caused by , go to https://dubbo.apache.org/faq/0/12 to find instructions.
2026-05-14 17:12:50.744 [main] ERROR org.apache.dubbo.common.Version - [DUBBO] Duplicate class org/apache/dubbo/remoting/RemotingException.class in 2 jar [file:/var/www/java/api/java-meeting/java-meeting2.0/ubains-meeting-inner-api-1.0-SNAPSHOT.jar!/BOOT-INF/lib/dubbo-3.1.10.jar!/org/apache/dubbo/remoting/RemotingException.class, file:/var/www/java/api/java-meeting/java-meeting2.0/ubains-meeting-inner-api-1.0-SNAPSHOT.jar!/BOOT-INF/lib/dubbo-remoting-api-3.1.10.jar!/org/apache/dubbo/remoting/RemotingException.class], dubbo version: 3.1.10, current host: 172.17.0.6, error code: 0-12. This may be caused by , go to https://dubbo.apache.org/faq/0/12 to find instructions.
---
## Python应用全深度分析
- **健康检查:** <h1>Not Found</h1><p>The requested resource was not found on this server.</p>
- **错误总数:** 60
- **错误类型:**
- MQTT异常: 45次
- MySQL通信异常: 6次
- 其他异常: 9次
---
## Python_voice应用全深度分析
- **健康检查:** <!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Page not found at /actuator/health</title>
<meta name="robots" content="NONE,NO
- **错误总数:** 16
- **错误类型:**
- 连接异常: 2次
- 其他异常: 14次
---
## Nacos应用全深度分析
- **健康检查:** <!doctype html><html lang="en"><head><title>HTTP Status 404 – Not Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;}
- **错误总数:** 0
---
## Nginx应用全深度分析
- **Nginx版本:** nginx version: nginx/1.29.3
- **Worker配置:** worker_processes auto;
worker_connections 1024;
keepalive_timeout 65;
#gzip on;
- **最近错误:** 15条
**HTTP状态码分布:**
```
402 200
48 101
38 404
9 "-"
2 405
1 500
```
---
## Docker容器资源全分析
| 容器名 | CPU% | 内存使用 | 内存% | 网络IO | 磁盘IO | 运行时间 | 重启次数 |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| cardtable | 0.14% | 99.25MiB / 15.12GiB | 0.64% | 0B / 0B | 438MB / 2.31GB | - | - |
| upython_voice | 8.59% | 236.9MiB / 15.12GiB | 1.53% | 36MB / 34.8MB | 104MB / 8.19kB | running true 2026-05-14T09:25:13.419473193Z | 0 |
| upython | 1.21% | 548.6MiB / 15.12GiB | 3.54% | 449MB / 226MB | 70.6MB / 8.19kB | running true 2026-05-14T09:18:44.239561436Z | 0 |
| paperless | 0.11% | 447.9MiB / 15.12GiB | 2.89% | 88.9MB / 61.4MB | 490MB / 0B | - | - |
| ujava2 | 3.10% | 4.535GiB / 15.12GiB | 29.99% | 4.19GB / 1.52GB | 3.29GB / 7.27MB | running true 2026-05-13T07:15:08.276804942Z | 0 |
| unginx | 0.00% | 60.66MiB / 15.12GiB | 0.39% | 4.01GB / 47.4GB | 809MB / 0B | running true 2026-04-17T04:40:48.473369606Z | 0 |
| ungrok | 0.01% | 6.164MiB / 15.12GiB | 0.04% | 0B / 0B | 49.5MB / 8.19kB | - | - |
| ustorage | 0.02% | 31.52MiB / 15.12GiB | 0.20% | 0B / 0B | 61.8MB / 106kB | running true 2026-04-17T04:40:49.155849548Z | 0 |
| utracker | 0.01% | 3.801MiB / 15.12GiB | 0.02% | 0B / 0B | 9.43MB / 65.7MB | running true 2026-04-17T04:40:49.355037205Z | 0 |
| unacos | 0.78% | 778.2MiB / 15.12GiB | 5.03% | 4.5GB / 4.66GB | 534MB / 56.7MB | running true 2026-04-17T04:40:48.786936232Z | 0 |
| uemqx | 0.74% | 243MiB / 15.12GiB | 1.57% | 9.53MB / 7.98MB | 192MB / 74.6MB | running true 2026-05-14T06:09:13.086013974Z | 0 |
| uredis | 0.66% | 31.51MiB / 15.12GiB | 0.20% | 0B / 0B | 161MB / 121MB | running true 2026-05-13T07:14:10.694987537Z | 0 |
| umysql | 0.12% | 1.738GiB / 15.12GiB | 11.50% | 12.6GB / 41.1GB | 6.62GB / 138GB | running true 2026-04-23T04:34:02.628556166Z | 0 |
**容器日志文件大小:**
- umysql: 32M
- uredis: 5.5M
- uemqx: 387K
- ujava2: 670K
- utracker: 12K
- ustorage: 20K
**Docker磁盘总使用:**
```
Images space usage:
REPOSITORY TAG IMAGE ID CREATED SIZE SHARED SIZE UNIQUE SIZE CONTAINERS
ufastdfs v2 32631a4618e2 4 weeks ago 1.05GB 0B 1.049GB 2
139.9.60.86:5000/upython v16 e4ed09c47ae2 5 weeks ago 6.93GB 2.386GB 4.548GB 1
139.9.60.86:5000/redis v3 3f5759b8f760 5 months ago 288MB 0B 288.4MB 1
139.9.60.86:5000/ujava v6 1
```
**容器健康检查:**
- umysql: no healthcheck
- uredis: no healthcheck
- uemqx: no healthcheck
- ujava2: no healthcheck
**容器资源限制:**
- umysql: CPU: 0, Memory: 0, MemorySwap: 0
- uredis: CPU: 0, Memory: 0, MemorySwap: 0
- uemqx: CPU: 0, Memory: 0, MemorySwap: 0
- ujava2: CPU: 0, Memory: 0, MemorySwap: 0
---
## 端口与服务状态检测
| 端口 | 服务 | 状态 | 监听 | 连接数 |
| :--- | :--- | :--- | :--- | :--- |
| 8306 | MySQL | listening | LISTENING | 17 |
| 6379 | Redis | listening | LISTENING | 32 |
| 1883 | EMQX-MQTT | listening | LISTENING | 20 |
| 8883 | EMQX-SSL | listening | LISTENING | 0 |
| 8083 | EMQX-WebSocket | listening | LISTENING | 0 |
| 8080 | Java-Web | listening | LISTENING | 0 |
| 443 | HTTPS | listening | LISTENING | 0 |
| 8997 | Java-Backend | not_listening | NOT LISTENING | 0 |
| 8998 | Java-Login | not_listening | NOT LISTENING | 0 |
| 8999 | Java-Admin | listening | LISTENING | 0 |
| 8000 | Python | listening | LISTENING | 0 |
| 8003 | Python_voice | listening | LISTENING | 0 |
| 22122 | FastDFS-Tracker | listening | LISTENING | 2 |
| 23000 | FastDFS-Storage | listening | LISTENING | 0 |
| 8848 | Nacos | listening | LISTENING | 0 |
| 22 | SSH | listening | LISTENING | 3 |
**容器状态检测:**
- umysql: OK running
- uredis: OK running
- uemqx: OK running
- ujava2: OK running
- utracker: OK running
- ustorage: OK running
- upython: OK running
- upython_voice: OK running
- unginx: OK running
- unacos: OK running
---
## 会议系统应用日志分析
**错误总数:** 30
**错误类型统计:**
- Dubbo服务调用失败: 0次
- 钉钉同步异常: 1次
- MQTT连接失败: 0次
- MySQL通信异常: 0次
- MyBatis查询异常: 0次
- 其他异常: 29次
**最近错误日志:**
> 2026-05-14 18:21:31.506 [http-nio-8999-exec-7] ERROR c.u.m.legacy.smc.impl.SmcConferenceServiceImpl - 获取SMC历史会议失败
> 2026-05-14 18:21:31.580 [http-nio-8999-exec-2] ERROR com.ubains.meeting.utils.LogsUtil - [SMCTokenServiceImplSMCToken服务层][SMC3.0远程获取token][IP:192.168.
> error:"<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n</bo
> 2026-05-14 18:21:31.581 [http-nio-8999-exec-7] ERROR com.ubains.meeting.utils.LogsUtil - [SMCTokenServiceImplSMCToken服务层][SMC3.0远程获取token][IP:192.168.
> error:"<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n</bo
> 2026-05-14 18:21:31.582 [http-nio-8999-exec-2] ERROR c.u.m.legacy.smc.impl.SmcConferenceServiceImpl - 获取SMC历史会议失败
> 2026-05-14 18:21:31.582 [http-nio-8999-exec-7] ERROR c.u.m.legacy.smc.impl.SmcConferenceServiceImpl - 获取SMC历史会议失败
> 2026-05-14 18:21:31.655 [http-nio-8999-exec-2] ERROR com.ubains.meeting.utils.LogsUtil - [SMCTokenServiceImplSMCToken服务层][SMC3.0远程获取token][IP:192.168.
> error:"<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n</bo
> 2026-05-14 18:21:31.655 [http-nio-8999-exec-7] ERROR com.ubains.meeting.utils.LogsUtil - [SMCTokenServiceImplSMCToken服务层][SMC3.0远程获取token][IP:192.168.
> error:"<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n</bo
> 2026-05-14 18:21:31.657 [http-nio-8999-exec-2] ERROR c.u.m.legacy.smc.impl.SmcConferenceServiceImpl - 获取SMC历史会议失败
> 2026-05-14 18:21:31.657 [http-nio-8999-exec-7] ERROR c.u.m.legacy.smc.impl.SmcConferenceServiceImpl - 获取SMC历史会议失败
> 2026-05-14 18:22:59.376 [http-nio-8999-exec-2] ERROR com.ubains.meeting.utils.LogsUtil - [LzzshService兰州中化石业务层][兰州返回角色权限组][IP:192.168.9.51][200576][AP
> error:"lzzsh.switch"
**错误频率(按小时):**
```
199 2026-05-14 17
61 2026-05-14 18
4 2026-05-14 16
```
**MQTT连接失败:** at org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter.messageArrived(MqttPahoMessageDrivenChannelAdapter.java:412)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:514)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:417)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:214)
2026-05-14 17:12:31.116 [MQTT Call: consumer_client_androidPanelMQTT2_ip_172
---
## 网络TCP连接状态分析
- ESTABLISHED: 119
- LISTEN: 54
- TIME_WAIT: 15
- FIN_WAIT2: 14
- ST: 1
**网络连通性:**
- 网关(192.168.5.1): 正常
- DNS解析: 正常
- 钉钉API: HTTP_CODE:200 TIME:0.170842s
- Java->MySQL: 异常
- Java->EMQX: 异常
- Java->Python: 异常
- Java->Python_voice: 异常
- Java->nginx: 异常
---
## 系统日志统计(24小时)
- **内核错误:** 0
- **认证失败:** 0
- **磁盘错误:** 0
- **OOM事件:**
---
## NTP时钟同步状态
- **时钟同步:** Local time: 五 2026-05-15 09:03:34 CST
Universal time: 五 2026-05-15 01:03:34 UTC
RTC time: 五 2026-05-15 01:03:34
Time zone: Asia/Shanghai (CST, +0800)
System
- **时钟偏差:** System time : 0.000021353 seconds fast of NTP time
Last offset : -0.000039390 seconds
RMS offset : 0.000047056 seconds
- **当前时间:** 2026年 05月 15日 星期五 09:03:35 CST
---
## SSL证书有效期
- **HTTPS(443):** notBefore=Mar 24 00:00:00 2026 GMT
notAfter=Oct 8 23:59:59 2026 GMT
subject=CN = *.ubainsyun.com | 剩余146天 | normal
- **EMQX(8883):** notBefore=May 8 08:07:05 2020 GMT
notAfter=May 6 08:07:05 2030 GMT
subject=C = CN, ST = hangzhou, O = EMQ, CN = Server | 剩余1451天 | normal
---
## 定时任务
- **Crontab:** #0 13 * * * bash /usr/local/docker/UbainsmysqlBakUp.sh
- **Systemd定时器:** Fri 2026-05-15 09:08:34 CST 4min 59s Fri 2026-05-15 07:49:53 CST 1h 13min ago dnf-makecache.timer dnf-makecache.service
Fri 2026-05-15 09:10:53 CST 7min Thu 2026-05-14 09:10:53 CST 23h ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
---
## 安全检测摘要
- **SELinux:** Enforcing
- **防火墙:** public (active)
target: default
icmp-block-inversion: no
interfaces: ens18
sources:
services: dhcpv6-client mdns ssh
ports: 22/tcp 443/tcp 8848/tcp 9848/tcp 1883/tcp 8883/tcp 6379/tcp 830
- **开放端口:** 112个
- **异常账户(UID=0):**
- **SSH配置:** #Port 22
PermitRootLogin yes
#MaxAuthTries 6
PasswordAuthentication yes
# PasswordAuthentication. Depending on your PAM configuration,
# the setting of "PermitRootLogin prohibit-password".
# PAM authentication, then enable this but set PasswordAuthentication
#GatewayPorts no
GatewayPorts no
- **暴力破解IP TOP5:** 6 192.168.5.57
1 Wed
1
- **可疑SUID文件:** /data/dockers/rootfs/overlayfs/fa7ab27a4ac3e5e0f33865ec6721a2a300a5be2971c760404002ede2acf1a1fa/usr/bin/newgrp
/data/dockers/rootfs/overlayfs/fa7ab27a4ac3e5e0f33865ec6721a2a300a5be2971c760404002ede2acf1a1fa/usr/bin/gpasswd
/data/dockers/rootfs/overlayfs/fa7ab27a4ac3e5e0f33865ec6721a2a300a5be2971c760
---
## AI分析建议
1. 检测到钉钉同步异常,建议检查钉钉API配置和网络
2. Redis缓存命中率51.63%偏低,建议检查缓存策略
---
*报告生成时间: 2026-05-15 09:01:05*
*全深入巡检 v3 终极版 - 检测点数量: 120+*
\ No newline at end of file
# 服务器巡检报告 JSON 格式说明
## 版本历史
| 版本 | 日期 | 说明 | 作者 |
|:---|:---|:---|:---|
| 1.0 | 2026-05-15 | 初始版本 | AI巡检系统 |
---
## 1. 文件规范
### 1.1 文件命名
```
health_summary_<服务器名>_<时间戳>.json
```
**示例:**
```
health_summary_兰州中石化_20260515062304.json
health_summary_展厅环境_20260515093523.json
```
### 1.2 文件编码
- **编码格式**: UTF-8
- **BOM**: 不建议添加
- **缩进**: 2个空格
- **换行符**: `\n` (Unix风格)
### 1.3 字符集
- **字符串**: 必须使用UTF-8编码
- **特殊字符**: JSON中需要转义的字符必须转义
- **中文**: 支持中文键名和值
---
## 2. JSON 结构
```json
{
"version": "1.0",
"report_type": "server_health_check",
"timestamp": "2026-05-15T06:23:04",
"server": {
"name": "兰州中石化",
"host": "139.159.163.86",
"hostname": "kunpeng",
"uptime_days": 183,
"os": "Ubuntu 18.04.3 LTS",
"kernel": "Linux 4.15.0-70-generic"
},
"status": {
"overall": "warning",
"critical_issues": 0,
"warnings": 3,
"score": 75
},
"metrics": {
"cpu": {
"percent": 1.1,
"cores": 8,
"load_1min": 0.0,
"load_5min": 0.0,
"load_15min": 0.0
},
"memory": {
"percent": 78.7,
"used_gb": 11.8,
"total_gb": 15.0,
"swap_used_gb": 0.1,
"swap_total_gb": 7.8
},
"disk": {
"root_percent": 66.0,
"root_used_gb": 46.2,
"root_total_gb": 70.0,
"data_percent": 23.0,
"data_used_gb": 92.0,
"data_total_gb": 400.0
},
"network": {
"established": 77,
"time_wait": 2,
"close_wait": 10
},
"process": {
"total_threads": 1443,
"zombie_processes": 0,
"running_processes": 145
}
},
"services": {
"mysql": {
"version": "8.0.28",
"uptime_seconds": 15276380,
"connections": {
"current": 15,
"max": 151,
"usage_percent": 9.9
},
"queries": {
"slow_count": 0,
"qps": 146783128
},
"databases": [
{"name": "ubains", "size_mb": 1433.16},
{"name": "ubains_lz_0", "size_mb": 45.66}
]
},
"redis": {
"version": "6.2.6",
"uptime_days": 3,
"memory_mb": 1.16,
"hit_rate_percent": 58.0,
"key_count": 69,
"clients": 14
},
"emqx": {
"version": "5.8.7",
"uptime_days": 37,
"sessions": 166,
"subscriptions": 23,
"clients": 14,
"messages": {
"delivered": 0,
"dropped": 535
}
},
"java": {
"version": "1.8.0_321",
"process": {
"memory_mb": 88,
"threads": 1,
"file_descriptors": 7
}
}
},
"containers": [
{
"name": "umysql",
"status": "running",
"cpu_percent": 0.23,
"memory_mb": 2134,
"memory_percent": 26.46,
"restart_count": 0
},
{
"name": "ujava2",
"status": "running",
"cpu_percent": 0.86,
"memory_mb": 2432,
"memory_percent": 29.08,
"restart_count": 0
}
],
"security": {
"auth_failures_24h": 267,
"ssh_brute_force": {
"enabled": true,
"top_ips": [
{"ip": "1.71.254.57", "attempts": 25},
{"ip": "115.151.72.100", "attempts": 22}
]
},
"ssh_config": {
"root_login": "yes",
"password_auth": "yes"
},
"selinux": "disabled",
"firewall": "configured"
},
"issues": {
"critical": [],
"warning": [
{
"category": "内存",
"message": "内存使用率偏高",
"current": "78.7%",
"threshold": "85%",
"impact": "medium"
},
{
"category": "进程",
"message": "线程总数偏高",
"current": "1443",
"threshold": "1000",
"impact": "medium"
},
{
"category": "缓存",
"message": "Redis缓存命中率偏低",
"current": "58.0%",
"threshold": "90%",
"impact": "low"
}
]
},
"trends": {
"cpu": {
"current": "1.1%",
"previous": "1.1%",
"change": "0.0%",
"trend": "stable"
},
"memory": {
"current": "78.7%",
"previous": "78.7%",
"change": "0.0%",
"trend": "stable"
}
},
"ai_analysis": {
"overall_status": "需要关注",
"risk_level": "medium",
"suggestions": [
{
"priority": "high",
"category": "性能优化",
"title": "线程数偏高排查",
"description": "当前线程数1443超过建议阈值1000,建议排查是否存在线程泄漏或未正确关闭的连接。",
"actions": ["使用jstack检查线程状态", "检查连接池配置"]
},
{
"priority": "medium",
"category": "缓存优化",
"title": "Redis缓存命中率提升",
"description": "当前缓存命中率58%低于建议值90%,建议检查缓存策略和键的过期时间设置。",
"actions": ["分析热点数据", "调整过期策略"]
}
]
},
"report": {
"full_path": "/root/reports/health_20260515_062304.md",
"relative_path": "health_20260515_062304.md",
"size_bytes": 25068,
"generated_by": "ai_health_check_v3",
"check_duration_seconds": 45
}
}
```
---
## 3. 字段详细说明
### 3.1 根级别字段
#### version
- **类型**: `string`
- **必填**: 是
- **说明**: JSON格式版本号
- **格式**: `主版本.次版本` (如: "1.0")
- **枚举值**: "1.0"
#### report_type
- **类型**: `string`
- **必填**: 是
- **说明**: 报告类型标识
- **固定值**: "server_health_check"
- **用途**: 区分不同类型的巡检报告
#### timestamp
- **类型**: `string`
- **必填**: 是
- **说明**: 报告生成时间
- **格式**: ISO 8601格式 `YYYY-MM-DDTHH:mm:ss`
- **示例**: "2026-05-15T06:23:04"
- **时区**: 使用服务器本地时区
---
### 3.2 server(服务器信息)
#### server.name
- **类型**: `string`
- **必填**: 是
- **说明**: 服务器/项目名称
- **最大长度**: 50字符
- **示例**: "兰州中石化", "展厅环境", "生产环境A"
#### server.host
- **类型**: `string`
- **必填**: 是
- **说明**: 服务器IP地址
- **格式**: IPv4地址
- **示例**: "192.168.1.100", "139.159.163.86"
#### server.hostname
- **类型**: `string`
- **必填**: 否
- **说明**: 主机名
- **最大长度**: 50字符
- **示例**: "kunpeng", "localhost"
#### server.uptime_days
- **类型**: `integer`
- **必填**: 否
- **说明**: 系统持续运行时间(天)
- **范围**: >= 0
- **示例**: 183, 30
#### server.os
- **类型**: `string`
- **必填**: 否
- **说明**: 操作系统名称和版本
- **示例**: "Ubuntu 18.04.3 LTS", "openEuler 24.03 (LTS-SP3)"
#### server.kernel
- **类型**: `string`
- **必填**: 否
- **说明**: 内核版本信息
- **示例**: "Linux 4.15.0-70-generic"
---
### 3.3 status(整体状态)
#### status.overall
- **类型**: `string`
- **必填**: 是
- **说明**: 整体健康状态
- **枚举值**:
- `"normal"`: 正常,无严重问题
- `"warning"`: 警告,存在需要注意的问题
- `"critical"`: 严重,存在紧急问题
- **判断规则**:
- `critical`: critical_issues > 0 OR 任何指标严重超阈值
- `warning`: warnings >= 3 OR 任何指标警告超阈值
- `normal`: 其他情况
#### status.critical_issues
- **类型**: `integer`
- **必填**: 是
- **说明**: 严重问题数量
- **范围**: >= 0
#### status.warnings
- **类型**: `integer`
- **必填**: 是
- **说明**: 警告问题数量
- **范围**: >= 0
#### status.score
- **类型**: `integer`
- **必填**: 否
- **说明**: 健康评分(0-100)
- **范围**: 0-100
- **计算建议**:
```
100 - (critical_issues * 20) - (warnings * 5)
```
---
### 3.4 metrics(核心指标)
#### metrics.cpu
- **类型**: `object`
- **说明**: CPU相关指标
| 字段 | 类型 | 必填 | 说明 |
|:---|:---|:---|:---|
| percent | number | 是 | CPU使用率(0-100) |
| cores | integer | 否 | CPU核心数 |
| load_1min | number | 否 | 1分钟平均负载 |
| load_5min | number | 否 | 5分钟平均负载 |
| load_15min | number | 否 | 15分钟平均负载 |
**告警阈值**:
- percent > 85: 警告
- percent > 95: 严重
- load_1min > cores * 2: 警告
#### metrics.memory
- **类型**: `object`
- **说明**: 内存相关指标
| 字段 | 类型 | 必填 | 说明 |
|:---|:---|:---|:---|
| percent | number | 是 | 内存使用率(0-100) |
| used_gb | number | 否 | 已使用内存(GB) |
| total_gb | number | 否 | 总内存(GB) |
| swap_used_gb | number | 否 | Swap已使用(GB) |
| swap_total_gb | number | 否 | Swap总量(GB) |
**告警阈值**:
- percent > 85: 警告
- percent > 95: 严重
- swap_used_gb > 0: 警告
#### metrics.disk
- **类型**: `object`
- **说明**: 磁盘相关指标
| 字段 | 类型 | 必填 | 说明 |
|:---|:---|:---|:---|
| root_percent | number | 是 | 根分区使用率(0-100) |
| root_used_gb | number | 否 | 根分区已使用(GB) |
| root_total_gb | number | 否 | 根分区总量(GB) |
| data_percent | number | 否 | 数据分区使用率(0-100) |
| data_used_gb | number | 否 | 数据分区已使用(GB) |
| data_total_gb | number | 否 | 数据分区总量(GB) |
**告警阈值**:
- root_percent > 90: 警告
- data_percent > 90: 警告
#### metrics.network
- **类型**: `object`
- **说明**: 网络连接状态
| 字段 | 类型 | 必填 | 说明 |
|:---|:---|:---|:---|
| established | integer | 否 | ESTABLISHED连接数 |
| time_wait | integer | 否 | TIME_WAIT连接数 |
| close_wait | integer | 否 | CLOSE_WAIT连接数 |
**告警阈值**:
- time_wait > 500: 警告
- close_wait > 100: 警告
#### metrics.process
- **类型**: `object`
- **说明**: 进程相关指标
| 字段 | 类型 | 必填 | 说明 |
|:---|:---|:---|:---|
| total_threads | integer | 否 | 总线程数 |
| zombie_processes | integer | 否 | 僵尸进程数 |
| running_processes | integer | 否 | 运行中进程数 |
**告警阈值**:
- zombie_processes > 0: 严重
- total_threads > 1000: 警告
---
### 3.5 services(服务状态)
#### services.mysql
- **类型**: `object`
- **说明**: MySQL数据库状态
| 字段 | 类型 | 必填 | 说明 |
|:---|:---|:---|:---|
| version | string | 否 | MySQL版本号 |
| uptime_seconds | integer | 否 | 运行时长(秒) |
| connections | object | 否 | 连接信息 |
| queries | object | 否 | 查询统计 |
| databases | array | 否 | 数据库列表 |
#### services.redis
- **类型**: `object`
- **说明**: Redis缓存状态
| 字段 | 类型 | 必填 | 说明 |
|:---|---|:---|:---|
| version | string | 否 | Redis版本号 |
| uptime_days | integer | 否 | 运行天数 |
| memory_mb | number | 否 | 内存使用量(MB) |
| hit_rate_percent | number | 否 | 缓存命中率(0-100) |
| key_count | integer | 否 | 键总数 |
| clients | integer | 否 | 客户端连接数 |
**告警阈值**:
- hit_rate_percent < 90: 警告
#### services.emqx
- **类型**: `object`
- **说明**: EMQX消息队列状态
| 字段 | 类型 | 必填 | 说明 |
|:---|:---|:---|:---|
| version | string | 否 | EMQX版本号 |
| uptime_days | integer | 否 | 运行天数 |
| sessions | integer | 否 | 会话数 |
| subscriptions | integer | 否 | 订阅数 |
| clients | integer | 否 | 客户端连接数 |
| messages | object | 否 | 消息统计 |
#### services.java
- **类型**: `object`
- **说明**: Java应用状态
| 字段 | 类型 | 必填 | 说明 |
|:---|---|:---|:---|
| version | string | 否 | Java版本号 |
| process | object | 否 | 进程信息 |
---
### 3.6 containers(容器状态)
**类型**: `array`
**说明**: Docker容器列表
**数组元素结构**:
| 字段 | 类型 | 必填 | 说明 |
|:---|:---|:---|:---|
| name | string | 是 | 容器名称 |
| status | string | 是 | 容器状态 |
| cpu_percent | number | 否 | CPU使用率 |
| memory_mb | number | 否 | 内存使用量(MB) |
| memory_percent | number | 否 | 内存使用率 |
| restart_count | integer | 否 | 重启次数 |
**状态枚举值**:
- `"running"`: 运行中
- `"exited"`: 已停止
- `"restarting"`: 重启中
**告警阈值**:
- restart_count > 0: 警告
- status = "exited": 检查是否应该运行
---
### 3.7 security(安全信息)
#### security.auth_failures_24h
- **类型**: `integer`
- **必填**: 否
- **说明**: 过去24小时认证失败次数
- **范围**: >= 0
#### security.ssh_brute_force
- **类型**: `object`
- **说明**: SSH暴力破解信息
| 字段 | 类型 | 必填 | 说明 |
|:---|:---|:---|:---|
| enabled | boolean | 否 | 是否检测到暴力破解 |
| top_ips | array | 否 | 攻击源IP列表 |
**top_ips数组元素**:
```json
{
"ip": "1.71.254.57",
"attempts": 25
}
```
#### security.ssh_config
- **类型**: `object`
- **说明**: SSH配置状态
| 字段 | 类型 | 必填 | 说明 |
|:---|---|:---|:---|
| root_login | string | 否 | root登录状态 ("yes"/"no") |
| password_auth | string | 否 | 密码认证状态 ("yes"/"no") |
---
### 3.8 issues(问题列表)
#### issues.critical
- **类型**: `array`
- **说明**: 严重问题列表
- **可以为空**: `[]`
**数组元素结构**:
```json
{
"category": "分类",
"message": "问题描述",
"current": "当前值",
"threshold": "阈值",
"impact": "影响程度"
}
```
#### issues.warning
- **类型**: `array`
- **说明**: 警告问题列表
- **可以为空**: `[]`
**数组元素结构**: 同critical
**impact枚举值**:
- `"low"`: 低影响
- `"medium"`: 中等影响
- `"high"`: 高影响
- `"critical"`: 严重影响
---
### 3.9 trends(趋势分析)
- **类型**: `object`
- **说明**: 与上次巡检的对比分析
**结构**:
```json
{
"cpu": {
"current": "1.1%",
"previous": "1.1%",
"change": "0.0%",
"trend": "stable"
}
}
```
**trend枚举值**:
- `"up"`: 上升/恶化
- `"down"`: 下降/改善
- `"stable"`: 持平
---
### 3.10 ai_analysis(AI分析)
#### ai_analysis.overall_status
- **类型**: `string`
- **必填**: 否
- **说明**: AI分析的整体结论
- **示例**: "正常", "需要关注", "紧急"
#### ai_analysis.risk_level
- **类型**: `string`
- **必填**: 否
- **说明**: 风险等级
- **枚举值**: `"low"`, `"medium"`, `"high"`, `"critical"`
#### ai_analysis.suggestions
- **类型**: `array`
- **说明**: AI生成的建议列表
**数组元素结构**:
```json
{
"priority": "优先级",
"category": "分类",
"title": "建议标题",
"description": "详细说明",
"actions": ["操作1", "操作2"]
}
```
**priority枚举值**:
- `"critical"`: 紧急
- `"high"`: 高
- `"medium"`: 中
- `"low"`: 低
---
### 3.11 report(报告信息)
#### report.full_path
- **类型**: `string`
- **必填**: 否
- **说明**: 完整MD报告的绝对路径
- **示例**: "/root/reports/health_20260515_062304.md"
#### report.relative_path
- **类型**: `string`
- **必填**: 否
- **说明**: 完整MD报告的相对文件名
- **示例**: "health_20260515_062304.md"
#### report.size_bytes
- **类型**: `integer`
- **必填**: 否
- **说明**: 报告文件大小(字节)
#### report.generated_by
- **类型**: `string`
- **必填**: 否
- **说明**: 生成工具/脚本名称
- **示例**: "ai_health_check_v3"
#### report.check_duration_seconds
- **类型**: `integer`
- **必填**: 否
- **说明**: 巡检耗时(秒)
---
## 4. 最小化格式(快速实现)
如果只需要基本的钉钉通知,可以使用最小化格式:
```json
{
"timestamp": "2026-05-15T06:23:04",
"server": {
"name": "服务器名",
"host": "IP地址"
},
"status": {
"overall": "warning",
"critical_issues": 0,
"warnings": 3
},
"metrics": {
"cpu_percent": 1.1,
"memory_percent": 78.7,
"swap_percent": 1.4,
"threads": 1443
},
"services": {
"mysql": {
"connections": "15/151",
"usage_percent": 9.9
}
},
"issues": {
"critical": [],
"warning": [
"Swap已使用: 1.4%",
"总线程数: 1443"
]
}
}
```
---
## 5. 数据类型汇总
| 类型 | JSON类型 | 示例 | 说明 |
|:---|:---|:---|:---|
| 字符串 | `string` | `"兰州中石化"` | UTF-8编码 |
| 整数 | `integer` | `1443` | 无小数 |
| 浮点数 | `number` | `78.7` | 可含小数 |
| 布尔值 | `boolean` | `true` | 小写 |
| 数组 | `array` | `[]` | 有序列表 |
| 对象 | `object` | `{}` | 键值对 |
| null | `null` | `null` | 空值 |
---
## 6. 枚举值汇总
| 字段 | 枚举值 | 说明 |
|:---|:---|:---|
| status.overall | normal, warning, critical | 整体状态 |
| status.trend | up, down, stable | 趋势方向 |
| container.status | running, exited, restarting | 容器状态 |
| issue.impact | low, medium, high, critical | 影响程度 |
| suggestion.priority | critical, high, medium, low | 建议优先级 |
| security.risk_level | low, medium, high, critical | 风险等级 |
---
## 7. 命名规范
### 7.1 键名命名
- **格式**: 小写字母 + 下划线
- **示例**: `cpu_percent`, `auth_failures_24h`
- **避免**: 驼峰命名(camelCase)
### 7.2 特殊字符
- **中文字段名**: 支持但建议添加英文别名
- **数组索引**: 从0开始
- **时间戳**: ISO 8601格式
---
## 8. 错误处理
### 8.1 缺失必填字段
如果必填字段缺失,钉钉通知模块应:
- 使用默认值(如timestamp使用当前时间)
- 在日志中记录警告
- 生成包含提示信息的钉钉消息
### 8.2 数据类型错误
如果字段类型不匹配(如percent超出0-100范围),钉钉通知模块应:
- 记录错误日志
- 将该字段标记为"未知"
- 继续处理其他字段
### 8.3 编码错误
如果JSON文件编码不是UTF-8,钉钉通知模块应:
- 尝试其他编码读取
- 如果失败,返回明确错误信息
---
## 9. 扩展性
### 9.1 版本兼容
- **向后兼容**: 新增字段为可选
- **向前兼容**: 版本号升级时保持结构稳定
- **废弃字段**: 标记为deprecated,至少保留2个版本
### 9.2 自定义字段
允许添加自定义字段,但应遵循:
- 使用 `x_` 前缀
- 在文档中说明用途
- 不影响核心功能
### 9.3 示例
```json
{
"x_custom_field": "custom_value",
"x_project_code": "PXX-2024-001"
}
```
---
## 10. 示例文件
完整示例文件: `health_summary_example.json`
```json
{
"version": "1.0",
"report_type": "server_health_check",
"timestamp": "2026-05-15T06:23:04",
"server": {
"name": "兰州中石化",
"host": "139.159.163.86",
"hostname": "kunpeng",
"uptime_days": 183,
"os": "Ubuntu 18.04.3 LTS",
"kernel": "Linux 4.15.0-70-generic"
},
"status": {
"overall": "warning",
"critical_issues": 0,
"warnings": 3,
"score": 85
},
"metrics": {
"cpu": {
"percent": 1.1,
"cores": 8,
"load_1min": 0.0,
"load_5min": 0.0,
"load_15min": 0.0
},
"memory": {
"percent": 78.7,
"used_gb": 11.8,
"total_gb": 15.0,
"swap_used_gb": 0.1,
"swap_total_gb": 7.8
},
"disk": {
"root_percent": 66.0,
"root_used_gb": 46.2,
"root_total_gb": 70.0
},
"network": {
"established": 77,
"time_wait": 2,
"close_wait": 10
},
"process": {
"total_threads": 1443,
"zombie_processes": 0,
"running_processes": 145
}
},
"services": {
"mysql": {
"version": "8.0.28",
"uptime_seconds": 15276380,
"connections": {
"current": 15,
"max": 151,
"usage_percent": 9.9
},
"queries": {
"slow_count": 0,
"qps": 146783128
}
},
"redis": {
"version": "6.2.6",
"uptime_days": 3,
"hit_rate_percent": 58.0,
"memory_mb": 1.16
},
"emqx": {
"version": "5.8.7",
"uptime_days": 37,
"sessions": 166,
"clients": 14
}
},
"security": {
"auth_failures_24h": 267,
"ssh_brute_force": {
"enabled": true,
"top_ips": [
{"ip": "1.71.254.57", "attempts": 25}
]
}
},
"issues": {
"critical": [],
"warning": [
{
"category": "进程",
"message": "线程总数偏高",
"current": "1443",
"threshold": "1000",
"impact": "medium"
},
{
"category": "缓存",
"message": "Redis缓存命中率偏低",
"current": "58.0%",
"threshold": "90%",
"impact": "low"
}
]
},
"ai_analysis": {
"overall_status": "需要关注",
"risk_level": "medium",
"suggestions": [
{
"priority": "medium",
"category": "性能优化",
"title": "Redis缓存优化",
"description": "建议检查缓存策略和键的过期时间设置。",
"actions": ["分析热点数据", "调整过期策略"]
}
]
},
"report": {
"full_path": "/root/reports/health_20260515_062304.md",
"relative_path": "health_20260515_062304.md",
"size_bytes": 25068,
"generated_by": "ai_health_check_v3",
"check_duration_seconds": 45
}
}
```
---
## 11. 更新日志
### v1.0 (2026-05-15)
- 初始版本
- 定义基本字段结构
- 支持服务器健康检查数据
- 包含指标、服务、安全、问题等核心数据
---
## 12. 附录
### A. 错误码参考
| 错误码 | 说明 | 处理建议 |
|:---|:---|:---|
| JSON001 | 文件编码不是UTF-8 | 尝试其他编码或提示用户 |
| JSON002 | 必填字段缺失 | 使用默认值并记录警告 |
| JSON003 | 字段类型错误 | 记录错误,跳过该字段 |
| JSON004 | 枚举值无效 | 使用默认值,记录警告 |
| JSON005 | JSON格式错误 | 提示用户提供有效的JSON |
### B. 常用场景示例
#### 场景1: 正常服务器
```json
{
"status": {"overall": "normal", "critical_issues": 0, "warnings": 0},
"metrics": {"cpu_percent": 10.5, "memory_percent": 45.0},
"issues": {"critical": [], "warning": []}
}
```
#### 场景2: 内存告警
```json
{
"status": {"overall": "warning", "critical_issues": 0, "warnings": 1},
"metrics": {"memory_percent": 88.5},
"issues": {
"warning": [{"category": "内存", "message": "内存使用率偏高", "current": "88.5%"}]
}
}
```
#### 场景3: 严重故障
```json
{
"status": {"overall": "critical", "critical_issues": 2, "warnings": 5},
"issues": {
"critical": [
{"message": "MySQL服务已停止", "impact": "critical"}
]
}
}
```
---
## 13. 联系方式
如有疑问或需要扩展格式,请联系:
- **文档维护**: AI巡检系统团队
- **技术支持**: 参考项目README.md
---
**文档版本**: 1.0
**最后更新**: 2026-05-15
**下次审查**: 2026-06-15
# Report Summary Extractor Module
# Extract key information from health check report for DingTalk notification
function Get-ReportSummary {
param([string]$ReportPath)
if (-not (Test-Path $ReportPath)) {
throw "Report not found: $ReportPath"
}
# Read file with Default encoding (for Chinese)
$reader = [System.IO.StreamReader]::new($ReportPath, [System.Text.Encoding]::Default)
$content = $reader.ReadToEnd()
$reader.Close()
$info = @{}
# Extract header info
if ($content -match '\*\*时间:\*\*\s*(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})') {
$info.Time = $matches[1]
}
if ($content -match '\*\*主机:\*\*\s*([\d.]+)\s+\((\w+)\)') {
$info.Host = $matches[1]
$info.Hostname = $matches[2]
}
if ($content -match 'up\s+(\d+)\s+days?') {
$info.UptimeDays = [int]$matches[1]
}
if ($content -match '\*\*状态:\*\*\s*(正常|警告|严重)') {
$info.Status = $matches[1]
}
# Extract issues (more flexible pattern)
if ($content -match '关键问题.*?(\d+).*?警告.*?(\d+)') {
$info.CriticalIssues = [int]$matches[1]
$info.Warnings = [int]$matches[2]
}
# Extract metrics from table - search for value patterns in table context
$metrics = @{}
# CPU: find the percentage value near "CPU"
if ($content -match '(?s)\|.*?CPU.*?\|.*?([\d.]+%).*?\|') {
$metrics.CPU = $matches[1]
}
# Memory: find the percentage value near "Memory" or "内存"
if ($content -match '(?s)\|.*?Memory.*?\|.*?([\d.]+%).*?\|') {
$metrics.Memory = $matches[1]
}
# Swap: find the percentage value near "Swap"
if ($content -match '(?s)\|.*?Swap.*?\|.*?([\d.]+%).*?\|') {
$metrics.Swap = $matches[1]
}
# Disk: find the percentage value near "Disk"
if ($content -match '(?s)\|.*?Disk.*?\|.*?([\d.]+%).*?\|') {
$metrics.Disk = $matches[1]
}
# Threads: use Chinese column name
if ($content -match '(?s)\|.*?线程总数.*?\|.*?(\d+).*?\|') {
$metrics.Threads = $matches[1]
}
# Load: find the decimal value
if ($content -match '(?s)\|.*?Load.*?\|.*?([\d.]+).*?\|') {
$metrics.Load = $matches[1]
}
$info.Metrics = $metrics
# Extract service status (more flexible pattern)
if ($content -match '(\d+)\s*/\s*(\d+).*?(?i)current.*connections?') {
$info.MySQL = @{
Connections = "$($matches[1])/$($matches[2])"
Usage = ""
}
# Try to get usage
if ($content -match '(?i)current.*connections?.*?\(([\d.]+%)\)') {
$info.MySQL.Usage = $matches[1]
}
}
if ($content -match '(?i)slow.*quer.*?:\s*(\d+)') {
$info.SlowQueries = [int]$matches[1]
}
if ($content -match '(?i)cache.*hit.*ratio.*?:\s*([\d.]+%)') {
$info.RedisHitRate = $matches[1]
}
# Extract security info
if ($content -match '\*\*认证失败:\*\*\s*(\d+)') {
$info.AuthFailures = [int]$matches[1]
}
# Extract trends (simplified)
$trends = @{}
$info.Trends = $trends
return $info
}
function New-DingTalkSummary {
param([hashtable]$Info, [string]$ServerName = "")
$displayName = if ($ServerName) { $ServerName } else { $Info.Hostname }
# Status icon
$statusIcon = switch ($Info.Status) {
"Normal" { "OK" }
"Warning" { "WARN" }
"Critical" { "CRITICAL" }
default { "?" }
}
# Build summary
$summary = @"
### Server Health Report - $displayName
**Time**: $($Info.Time)
**Host**: $($Info.Host)
**Uptime**: $($Info.UptimeDays) days
**Status**: $statusIcon ($($Info.CriticalIssues) critical, $($Info.Warnings) warnings)
#### Metrics
"@
# Only show abnormal metrics
$abnormalMetrics = @()
# CPU check
if ($Info.Metrics.CPU) {
$cpuVal = [double]($Info.Metrics.CPU -replace '%')
if ($cpuVal -gt 85) {
$trendIcon = Get-TrendIcon -Trend $Info.Trends.CPU
$abnormalMetrics += "| CPU | $($Info.Metrics.CPU) | 85% | CRITICAL $trendIcon |"
}
}
# Memory check
if ($Info.Metrics.Memory) {
$memVal = [double]($Info.Metrics.Memory -replace '%')
if ($memVal -gt 85) {
$trendIcon = Get-TrendIcon -Trend $Info.Trends.Memory
$abnormalMetrics += "| Memory | $($Info.Metrics.Memory) | 85% | CRITICAL $trendIcon |"
}
elseif ($memVal -gt 70) {
$trendIcon = Get-TrendIcon -Trend $Info.Trends.Memory
$abnormalMetrics += "| Memory | $($Info.Metrics.Memory) | 85% | WARN $trendIcon |"
}
}
# Swap check
if ($Info.Metrics.Swap) {
$swapVal = [double]($Info.Metrics.Swap -replace '%')
if ($swapVal -gt 0) {
$abnormalMetrics += "| Swap | $($Info.Metrics.Swap) | - | WARN |"
}
}
# Threads check
if ($Info.Metrics.Threads) {
$threadsVal = [int]$Info.Metrics.Threads
if ($threadsVal -gt 1000) {
$trendIcon = Get-TrendIcon -Trend $Info.Trends.Threads
$abnormalMetrics += "| Threads | $($Info.Metrics.Threads) | 1000 | WARN $trendIcon |"
}
}
if ($abnormalMetrics.Count -eq 0) {
$summary += "`nAll metrics OK"
}
else {
$summary += "`n| Metric | Current | Threshold | Status |`n"
$summary += "| :--- | :--- | :--- | :--- |`n"
$summary += ($abnormalMetrics -join "`n")
}
# Service status
$summary += "`n`n#### Services`n"
$summary += "- MySQL: $($Info.MySQL.Connections) (usage $($Info.MySQL.Usage))`n"
$summary += "- Slow queries: $($Info.SlowQueries)`n"
$summary += "- Redis hit rate: $($Info.RedisHitRate)"
# Security alerts
if ($Info.AuthFailures -gt 100) {
$summary += "`n`n#### Security Alert`n"
$summary += "- Auth failures(24h): $($Info.AuthFailures)"
}
return $summary
}
function Get-TrendIcon {
param([string]$Trend)
if ($Trend -eq "+") { return "UP" }
if ($Trend -eq "-") { return "DOWN" }
return "SAME"
}
Export-ModuleMember -Function @('Get-ReportSummary', 'New-DingTalkSummary', 'Get-TrendIcon')
# Universal Report Summary Extractor
# Supports multiple report formats from different projects
function Get-UniversalReportSummary {
param([string]$ReportPath)
if (-not (Test-Path $ReportPath)) {
throw "Report not found: $ReportPath"
}
# Read with Default encoding for Chinese support
$reader = [System.IO.StreamReader]::new($ReportPath, [System.Text.Encoding]::Default)
$content = $reader.ReadToEnd()
$reader.Close()
$info = @{}
# Extract header info (support multiple formats)
if ($content -match '\*\*时间:\*\*\s*(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})') {
$info.Time = $matches[1]
}
if ($content -match '\*\*主机:\*\*\s*([\d.]+)\s*\((\w+)\)') {
$info.Host = $matches[1]
$info.Hostname = $matches[2]
}
# Extract uptime (support both "up X days" and "已运行X天")
if ($content -match 'up\s+(\d+)\s+days?') {
$info.UptimeDays = [int]$matches[1]
}
elseif ($content -match '已运行(\d+)天') {
$info.UptimeDays = [int]$matches[1]
}
# Extract status (support with/without emoji)
if ($content -match '\*\*状态:\*\*\s*(🟢|🟡|🔴)?\s*(正常|警告|严重)') {
$info.Status = $matches[2]
$info.StatusIcon = $matches[1]
}
elseif ($content -match '\*\*状态:\*\*\s*(正常|警告|严重)') {
$info.Status = $matches[1]
}
# Extract issues (support multiple formats)
# Format 1: "关键问题: 0, 警告: 3"
if ($content -match '关键问题[::]\s*(\d+).*?警告[::]\s*(\d+)') {
$info.CriticalIssues = [int]$matches[1]
$info.Warnings = [int]$matches[2]
}
# Format 2: "严重问题: 2, 警告: 13"
elseif ($content -match '严重问题[::]\s*(\d+).*?警告[::]\s*(\d+)') {
$info.CriticalIssues = [int]$matches[1]
$info.Warnings = [int]$matches[2]
}
# Format 3: "严重: 0, 警告: 0"
elseif ($content -match '严重[::]\s*(\d+).*?警告[::]\s*(\d+)') {
$info.CriticalIssues = [int]$matches[1]
$info.Warnings = [int]$matches[2]
}
# Format 4: "严重问题 (2):"
elseif ($content -match '严重问题\s*\((\d+)\):') {
$info.CriticalIssues = [int]$matches[1]
}
# Extract metrics (support Chinese and English column names)
$metrics = @{}
# CPU
if ($content -match '(?s)\|.*?CPU使用率.*?\|.*?([\d.]+%).*?\|') {
$metrics.CPU = $matches[1]
}
# Memory
if ($content -match '(?s)\|.*?内存使用率.*?\|.*?([\d.]+%).*?\|') {
$metrics.Memory = $matches[1]
}
# Swap
if ($content -match '(?s)\|.*?Swap使用率.*?\|.*?([\d.]+%).*?\|') {
$metrics.Swap = $matches[1]
}
# Threads
if ($content -match '(?s)\|.*?线程总数.*?\|.*?(\d+).*?\|') {
$metrics.Threads = $matches[1]
}
$info.Metrics = $metrics
# Extract service status
if ($content -match '(?i)(\d+)\s*/\s*(\d+).*?(当前|Current).*?(连接|connections?)') {
$info.MySQL = @{
Connections = "$($matches[1])/$($matches[2])"
Usage = ""
}
if ($content -match '(?i)(当前|Current).*?(连接|connections?).*?\(([\d.]+%)\)') {
$info.MySQL.Usage = $matches[3]
}
}
# Slow queries
if ($content -match '(?i)(慢查询数|Slow.*quer).*?:\s*(\d+)') {
$info.SlowQueries = [int]$matches[2]
}
# Redis cache hit rate
if ($content -match '(?i)(缓存命中率|Cache.*hit).*?:\s*([\d.]+%)') {
$info.RedisHitRate = $matches[2]
}
# Security info
if ($content -match '(?i)(认证失败|Auth.*fail).*?:\s*(\d+)') {
$info.AuthFailures = [int]$matches[2]
}
return $info
}
Export-ModuleMember -Function @('Get-UniversalReportSummary')
### Server Health Report - Lanzhou
**Time**: 2026-05-15 06:23:04
**Host**: 139.159.163.86
**Uptime**: 183 days
**Status**: ? (0 critical, 3 warnings)
#### Metrics
| Metric | Current | Threshold | Status |
| :--- | :--- | :--- | :--- |
| Swap | 1.4% | - | WARN |
| Threads | 1443 | 1000 | WARN SAME |
#### Services
- MySQL: (usage )
- Slow queries:
- Redis hit rate:
#### Security Alert
- Auth failures(24h): 267
# 服务器全深入巡检报告 v3 (终极版)
**时间:** 2026-05-15 06:23:04
**主机:** 139.159.163.86 (kunpeng)
**操作系统:** Ubuntu 18.04.3 LTS
**内核:** Linux kunpeng 4.15.0-70-generic #79-Ubuntu SMP Tue Nov 12 10:36:10 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux
**运行时间:** 06:23:06 up 183 days, 19:54, 0 users, load average: 0.00, 0.00, 0.00
**状态:** 警告
---
## 核心问题诊断
**严重问题:**
-
**警告:**
- Swap已使用: 1.4%
- 总线程数: 1443
- Redis缓存命中率: 58.0%
诊断摘要: 关键问题: 0, 警告: 3
---
## 资源使用概览
| 指标 | 当前值 | 阈值 | 状态 |
| :--- | :--- | :--- | :--- |
| CPU使用率 | 1.1% | 85% | ✅ |
| 内存使用率 | 78.7% | 85% | ✅ |
| Swap使用率 | 1.4% | - | ⚠️ |
| 磁盘使用率 | 66.0% | 90% | ✅ |
| 网络连接 | ESTABLISHED:77 | - | ✅ |
| 线程总数 | 1443 | 1000 | ⚠️ |
| 文件描述符使用率 | 0.9% | 80% | ✅ |
| 系统负载(1min) | 0.0 | 8 | ✅ |
---
## 进程资源TOP排名
**CPU TOP15 (按CPU使用率降序):**
| 排名 | PID | 进程名 | CPU% | 内存% |
| :--- | :--- | :--- | :--- | :--- |
| 1 | 30701 | sshd | 1.0 | 0.0 |
| 2 | 23951 | java | 0.6 | 16.6 |
| 3 | 26483 | java | 0.5 | 11.3 |
| 4 | 16541 | mysqld | 0.5 | 26.1 |
| 5 | 23315 | beam.smp | 0.3 | 2.9 |
| 6 | 17153 | mongod | 0.3 | 1.5 |
| 7 | 30334 | redis-server | 0.1 | 0.0 |
| 8 | 23583 | python | 0.1 | 0.9 |
| 9 | 9 | rcu_bh | 0.0 | 0.0 |
| 10 | 99 | irq/41-ACPI:Ged | 0.0 | 0.0 |
| 11 | 98 | kthrotld | 0.0 | 0.0 |
| 12 | 946 | wrapper | 0.0 | 0.0 |
| 13 | 935 | sshg-fw | 0.0 | 0.0 |
| 14 | 934 | sshguard | 0.0 | 0.0 |
| 15 | 933 | journalctl | 0.0 | 0.0 |
**系统总线程数:** 1443
**僵尸进程数:** 0
**D状态进程数:** 0
---
## MySQL全深度分析
- **版本:**
- **运行时间:** 15276380秒
- **当前连接:** 15 / 151 (使用率9.9%)
- **历史最大连接:** 51
- **慢查询数:** 0
- **QPS(Queries):** 146783128
**数据库大小:**
- Database Size(MB)
- mysql 11.47
- information_schema 0.00
- performance_schema 0.00
- sys 0.02
- devops 11.89
- ubains 1433.16
- wifi 36.11
- ubains_lz_0 45.66
- nacos_mysql 2.61
- ubains_xty 8.78
- devops_xty 8.63
- wifi2 0.53
- huazhao2 0.38
- devops_voice 4.72
- nacos_mysql2 4.22
- ubains_251120 132.97
- ubains_dhh1120 159.80
- ubains_big 286.19
**MySQL变量:**
- max_connections: `151`
- wait_timeout: `28800`
- interactive_timeout: `28800`
- innodb_buffer_pool_size: `134217728`
**表统计(TOP20):**
```
TABLE_SCHEMA TABLE_NAME TABLE_ROWS DATA_LENGTH INDEX_LENGTH
ubains sys_oper_log 275441 1491861504 0
ubains sys_user_role 5399 245760 180224
ubains rms_meeting_approval_task 2551 442368 0
ubains rms_manage_user_dids 2493 147456 0
ubains rms_manage_user 1416 540672 196608
ubains rms_meeting_signs 774 180224 49152
ubains rms_meeting_topic 728 229376 0
ubains rms_manage_control_connect 676 65536 49152
ubains rms_meeting_approval_signs 671 98304 16384
ubains rms_meeting_message 540 376832 114688
ubains rms_meeting_approval 448 212992 0
ubains rms_manage_device_port 445 49152 0
ubains rms_manage_seat 415 65536 0
ubains rms_manage_matrix_connect 414 65536 16384
ubains rms_manage_device 328 114688 49152
ubains rms_manage_audio_connect 304 81920 16384
ubains rms_configuration_global 268 114688 0
ubains rms_meeting_participant 264 81920 16384
ubains rms_room_city 231 16384 0
ubains rms_meeting_message_file 200 81920 0
```
**InnoDB缓冲池命中率:**
```
Variable_name Value
Innodb_buffer_pool_read_ahead_rnd 0
Innodb_buffer_pool_read_ahead 67171
Innodb_buffer_pool_read_ahead_evicted 4421
Innodb_buffer_pool_read_requests 25050510511
Innodb_buffer_pool_reads 730237
```
---
## Redis全深度分析
- **版本:** 6.2.6
- **运行天数:** 3
- **客户端连接:** 14
- **内存使用:** 1.16M
- **内存峰值:** 1.40M
- **内存碎片率:** 3.09
- **总键数:** 69
- **缓存命中率:** 58.0%
**Keyspace:**
```
# Keyspace
db0:keys=69,expires=29,avg_ttl=11218772
db10:keys=1,expires=1,avg_ttl=74779700
```
**持久化:**
```
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1778785800
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:528384
aof_enabled:1
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0
aof_current_size:57092521
aof_base_size:56380944
aof_pending_rewrite:0
aof_buffer_length:0
aof_rewrite_buffer_length:0
aof_pending_bio_fsync:0
aof_delayed_fsync:0
```
---
## EMQX消息队列全深度分析
- **状态:** Node 'emqx@172.17.0.4' 5.8.1 is started
- **Broker:** sysdescr : EMQX
version : 5.8.1
datetime : 2026-05-14T22:23:51.237541365+00:00
uptime : 37 days, 15 hours, 51 minutes, 44 seconds
- **会话数:** 166
- **订阅数:** 23
- **客户端连接数:** 14
- **Dashboard状态:** Node emqx@172.17.0.4 is started
emqx is running
- **集群状态:** Cluster status: #{running_nodes => ['emqx@172.17.0.4'],stopped_nodes => []}
**告警:**
```
<html><head><title>404 - NOT FOUND</title></head><body><h1>404 - NOT FOUND</h1></body></html>
```
**消息丢弃统计:**
```
authentication.failure : 0
delivery.dropped : 0
delivery.dropped.expired : 0
delivery.dropped.no_local : 0
delivery.dropped.qos0_msg : 0
delivery.dropped.queue_full : 0
delivery.dropped.too_large : 0
messages.dropped : 535
messages.dropped.await_pubrel_: 0
messages.dropped.no_subscriber: 535
messages.transformation_failed: 0
messages.validation_failed : 0
packets.publish.dropped : 0
session.discarded : 1
```
---
## Java应用JVM全深度分析
- **Java版本:** java version "1.8.0_321"
- **进程状态:** VmSize: 1860 kB
VmRSS: 88 kB
Threads: 1
- **打开文件描述符:** 7
- **Actuator Health:** {"success":false,"code":"403","message":"拒绝访问"}
**应用配置:**
```
```
---
## Docker容器资源全分析
| 容器名 | CPU% | 内存使用 | 内存% | 网络IO | 磁盘IO |
| :--- | :--- | :--- | :--- | :--- | :--- |
| dmserver | 0.00% | 4.203MiB / 7.788GiB | 0.05% | 1.16MB / 7.87kB | 655kB / 8.19kB |
| ungrok | 0.00% | 0B / 0B | 0.00% | 0B / 0B | 0B / 0B |
| paperless | 0.05% | 603.2MiB / 7.788GiB | 7.56% | 10.2MB / 10.5MB | 801MB / 4.1kB |
| upython | 0.10% | 554.4MiB / 7.788GiB | 6.95% | 1.65GB / 1.61GB | 246MB / 32.8kB |
| utracker3 | 0.01% | 76.63MiB / 7.788GiB | 0.96% | 0B / 0B | 414MB / 170MB |
| cardtable | 0.00% | 13.88MiB / 7.788GiB | 0.17% | 0B / 0B | 364MB / 0B |
| ujava2 | 0.86% | 2.265GiB / 7.788GiB | 29.08% | 321GB / 152GB | 7.52GB / 14.9MB |
| uemqx | 0.40% | 204.8MiB / 7.788GiB | 2.57% | 145MB / 223MB | 605MB / 1.83GB |
| uredis | 0.13% | 4.922MiB / 7.788GiB | 0.06% | 405MB / 202MB | 122MB / 5.19MB |
| umysql | 0.23% | 2.061GiB / 7.788GiB | 26.46% | 83.3GB / 297GB | 13.5GB / 34GB |
| armbaseenv | 0.00% | 5.93MiB / 7.788GiB | 0.07% | 0B / 0B | 7.75MB / 0B |
| pythonenv | 0.00% | 5.805MiB / 7.788GiB | 0.07% | 0B / 0B | 926kB / 0B |
| compilego | 0.00% | 1.523MiB / 7.788GiB | 0.02% | 0B / 0B | 487kB / 0B |
| umongo | 0.32% | 132.4MiB / 7.788GiB | 1.66% | 3.81MB / 32.4kB | 457MB / 51.3GB |
| ugo | 0.00% | 1.555MiB / 7.788GiB | 0.02% | 0B / 0B | 180kB / 0B |
**容器重启次数:**
```
dmserver 0 running
ungrok 182961 restarting
paperless 0 running
upython2 0 exited
uos 0 exited
uemqx2 52 exited
upython 0 running
utracker3 0 running
cardtable 0 running
ujava2 0 running
uemqx 389 running
uredis 0 running
umysql 0 running
armbaseenv 0 running
pythonenv 0 running
compilego 0 running
umongo 0 running
ugo 0 running
```
**容器日志文件大小:**
```
umysql: 31M (/opt/docker/lib/docker/containers/1303ab6507ec93917f7af33f375e1b0e80df93a4d584f6939825136d71720af3/1303ab6507ec93917f7af33f375e1b0e80df93a4d584f6939825136d71720af3-json.log)
uredis: 0 (/opt/docker/lib/docker/containers/a7ebb0aea8bb21b8139c55497807e300fcf64fb6fd814ea36baf624bab84e841/a7ebb0aea8bb21b8139c55497807e300fcf64fb6fd814ea36baf624bab84e841-json.log)
uemqx: 13M (/opt/docker/lib/docker/containers/38daae2c0acedddb06f6590a2d705be186f672616f65bd8275058bfb32a9c49a/38daae2c0acedddb06f6590a2d705be186f672616f65bd8275058bfb32a9c49a-json.log)
ujava2: 316K (/opt/docker/lib/docker/containers/cced2537794f2817303ced374e4a0cf20836a9e0a3fd81a58cafc1da9bc7f9bf/cced2537794f2817303ced374e4a0cf20836a9e0a3fd81a58cafc1da9bc7f9bf-json.log)
utracker3: 29K (/opt/docker/lib/docker/containers/cdb599c9b8da29cad248975710500a32fa03702654c4c0cca4986de0d35eec7f/cdb599c9b8da29cad248975710500a32fa03702654c4c0cca4986de0d35eec7f-json.log)
```
**Docker磁盘总使用:**
```
Images space usage:
REPOSITORY TAG IMAGE ID CREATED SIZE SHARED SIZE UNIQUE SIZE CONTAINERS
nginx v1.27.3 7b3a99c97c77 3 days ago 278.7MB 0B 278.7MB 0
139.9.60.86:5000/upython v15 98fb633c4de9 4 months ago 3.039GB 2.792GB 246.7MB 0
139.9.60.86:5000/python v15 90c7d8c91cee 4 months ago 2.82GB 2.792GB 28.38MB 0
paperless v1 56d09c45e6fd 7 months ago 612.2MB 65.66MB 546.6MB 1
nacos-server v2.5.1 2bfadf8add03 7 months ago 293.1MB 0B 293.1MB 0
dm8 v8 0db6b7291bf0 8 months ago 3.068GB 0B 3.068GB 1
upython v14 01ab87ee9edc 8 months ago 2.258GB 2.258GB 0B 0
armbaseenv v2 d805471ba96b 17 months ago 2.361GB 1.007GB 1.354GB 0
armbaseenv v1 7fa2bd23c105 17 months ago 1.028GB 1.007GB 20.76MB 0
swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/nginx latest-linuxarm64 5e0fa356e6f4 17 months ago 197.1MB 0B 197.1MB 0
umongodb v1 a0d6a90a9bfa 18 months ago 1.013GB 65.66MB 947.8MB 1
upython v13 3859027cdd45 18 months ago 2.215GB 2.215GB 0B 1
emqx/emqx 5.8.1 32632f41a736 19 months ago 252.5MB 0B 252.5MB 2
python 3.10 bd9c64a34b08 19 months ago 1.007GB 1.007GB 0B 2
ubuntu 20.04 223c04ea1fd5 19 months ago 65.66MB 65.66MB 0B 2
powerjob/powerjob-server latest d7d2f0f88b9f 21 months ago 479.7MB 0B 479.7MB 0
139.9.60.86:5000/umysql v4 307738dc6d58 22 months ago 339.2MB 0B 339.2MB 1
ubase v2 14848486bdc5 22 months ago 193.3MB 0B 193.3MB 0
ixuzhi/uos-server 1050e 5eb169f99f4f 22 months ago 1.128GB 0B 1.128GB 1
cardtable v3.3 e0b56dbf0974 2 years ago 918.2MB 0B 918.2MB 1
ngrok v1 6a1d154f1ca5 3 years ago 1.371GB 0B 1.371GB 1
139.9.60.86:5000/ujava v4 5772d73fd433 3 years ago 569.5MB 0B 569.5MB 1
139.9.60.86:5000/redis v2 7a56bdc802f7 4 years ago 107MB 0B 107MB 1
139.9.60.86:5000/ufastdfs v2 ab3274a2b55f 4 years ago 635.7MB 0B 635.7MB 1
swr.cn-south-1.myhuaweicloud.com/library/openjdk 8-jre 66bf39162ea7 7 years ago 442.8MB 0B 442.8MB 0
Containers space usage:
CONTAINER ID IMAGE COMMAND LOCAL VOLUMES SIZE CREATED STATUS NAMES
46b52ec557fa dm8:v8 "/opt/startup.sh" 0 299kB 5 weeks ago Up 5 weeks dmserver
8ed9322b8b2f ngrok:v1 "/home/ngrok.sh" 0 0B 4 months ago Restarting (1) 16 seconds ago ungrok
7c7f0ad9d5a3 paperless:v1 "/root/start.sh" 0 923kB 4 months ago Up 4 months paperless
021057a0a0eb 5baab2cf2750 "/var/www/html/start…" 0 483MB 4 months ago Exited (137) 2 months ago upython2
16a6ce50a148 ixuzhi/uos-server:1050e "/bin/bash" 0 83MB 6 months ago Exited (255) 6 months ago uos
6d4de6d83b35 emqx/emqx:5.8.1 "/usr/bin/docker-ent…" 2 0B 9 months ago Exited (128) 6 months ago uemqx2
a76d0c2dba2a upython:v13 "/var/www/html/start…" 0 72.7MB 10 months ago Up 2 weeks upython
cdb599c9b8da 139.9.60.86:5000/ufastdfs:v2 "/home/fastdfs_start…" 0 458MB 11 months ago Up 4 months utracker3
671ecd4817e8 cardtable:v3.3 "/root/start.sh" 0 27.2MB 12 months ago Up 5 months cardtable
cced2537794f 139.9.60.86:5000/ujava:v4 "/var/www/java/start…" 0 370MB 12 months ago Up 5 months ujava2
38daae2c0ace emqx/emqx:5.8.1 "/usr/bin/docker-ent…" 2 3.43MB 12 months ago Up 5 weeks uemqx
a7ebb0aea8bb 139.9.60.86:5000/redis:v2 "docker-entrypoint.s…" 0 729B 12 months ago Up 3 days uredis
1303ab6507ec 139.9.60.86:5000/umysql:v4 "docker-entrypoint.s…" 0 2.91GB 12 months ago Up 5 months umysql
f07200034d93 python:3.10 "python3" 0 1.35GB 17 months ago Up 5 months armbaseenv
6f04997a9ea6 python:3.10 "python3" 0 59.1MB 17 months ago Up 5 months pythonenv
4a5478e7f98d ubuntu:20.04 "/bin/bash" 0 394MB 17 months ago Up 5 months compilego
477787b79e18 umongodb:v1 "sh -c '/usr/local/m…" 0 836MB 18 months ago Up 5 months umongo
779e5faa5a3f ubuntu:20.04 "/bin/bash" 0 1.32GB 18 months ago Up 5 months ugo
Local Volumes space usage:
VOLUME NAME LINKS SIZE
179d7026729c2da654eac62710d0b7ddbc2f85dca81cafef8d2768a416959a77 0 70.12kB
1fe8668c160da16d869f1a464cc9b9a98f46d3f61b23f116324e510f3ad3c474 0 0B
cd33988820384f046aa3a4a577382ab0486d601c8affe3668cece0cde5b96d3a 0 0B
d005825dc89fc3d6e0b3ff573f2d0f2d426da1aefde4b09918f720df7c1c39a0 0 0B
720b36996d14a368535bc4f7b685ba8a897faba8e672e11a9ab71ed8d2297fe3 0 40.77kB
76ce39fe2190342faa0649b2a3b22f26d08cfbb56e880370f59e7a7187007ef8 0 53.01kB
c675516cb00b0bd6a9893baf6d068fff8ef0a2c4b59aebb0a62e0c600d762287 0 48.86kB
33059586faa0c09d437e71881e2cc602636e3e3bd6c204ed1bcd98a289401ae0 1 3.426MB
39006e2ebef2d958a39f81b541889249257f5b6ae2a9f92aa5f490883ea2168e 0 204.9MB
53adbf0698e5e816677a482c20257c5e521a1ca8dd6e61b4d7f247f0f94adcf9 0 0B
8d9d13151dc802cd0e98f0e8aa6bc1e8c5144f15adafe033809d79f4b8553d39 0 204.9MB
be5fddf482478dd3a2166d3c09ca953e2a8b46d49a0135772295944719051a87 0 0B
10fd5947ddaa0b00d301291093391bf8476f1e50151321252dcfc065332d7e4a 0 204.9MB
2a3d8a65879250e2f129916d5f1d557523ad492e04587b0400350d41907ba579 0 0B
2a839e14381c82af6cb3e8a2cc6f0ee5b89c87c5430c8fbf2afa5ebee110fc08 0 101.6kB
e3fbf2ffb103ed0efa24728949abf4eebc6766a4213805bfc2a34d6e408f6f3b 1 0B
f8c1c6ffbc8a4e7d7ed939ad4f5a622c7e426fd7771b9f50d83f882b3ffcbed9 0 0B
4d06af9188ba1d2e79cb2f83d02799a9c6801bca03b8e94c59c17a25651289eb 0 3.371MB
a8208c04dd4c1bc7c72c63a7e6b7e21e399ecbfd247d513939da6ac634809766 0 204.9MB
cddd3b7d04b260c54b34ab8d71d41bb14305468a4d6866417518d23696d41618 0 204.9MB
Build cache usage: 0B
CACHE ID CACHE TYPE SIZE CREATED LAST USED USAGE SHARED
```
**容器Healthcheck:**
```
=== umysql health ===
no healthcheck
=== uredis health ===
no healthcheck
=== uemqx health ===
no healthcheck
=== ujava2 health ===
no healthcheck
```
---
## Nginx分析
- **版本:** nginx version: nginx/1.21.6
- **Worker配置:**
- **最近错误:** 0条
---
## 端口与服务状态检测
| 端口 | 服务 | 状态 |
| :--- | :--- | :--- |
| 22 | SSH | ✅ LISTENING |
| 443 | HTTPS | ✅ LISTENING |
| 1883 | EMQX-MQTT | ✅ LISTENING |
| 6379 | Redis | ✅ LISTENING |
| 8080 | Java-Web | ✅ LISTENING |
| 8306 | MySQL | ✅ LISTENING |
| 8883 | EMQX-SSL | ✅ LISTENING |
| 8997 | Java-Backend | ✅ LISTENING |
| 8998 | Java-Login | ✅ LISTENING |
| 8999 | Java-Admin | ✅ LISTENING |
| 22122 | FastDFS-Tracker | ✅ LISTENING |
| 23000 | FastDFS-Storage | ✅ LISTENING |
**容器运行状态:**
- umysql: ✅ running
- uredis: ✅ running
- uemqx: ✅ running
- ujava2: ✅ running
- utracker3: ✅ running
---
## 会议系统应用日志分析
**错误总数:** 18
**分类错误检测:**
- Dubbo服务调用失败: 0次
- 钉钉同步异常: 0次
- MQTT连接失败: 0次
- MySQL通信异常: 0次
**错误频率(按小时):**
```
4 2026-05-15 02
2 2026-05-15 00
```
**日志文件大小:**
```
total 19M
drwxr-xr-x 2 root root 60K May 15 00:00 timeFile
-rw-r--r-- 1 root root 28K May 15 02:21 ubains-ERROR.log
-rw-r--r-- 1 root root 9.3M May 15 06:24 ubains-INFO-AND-ERROR.log
-rw-r--r-- 1 root root 9.1M May 15 06:24 ubains-INFO.log
总大小: 37M /var/www/java/api-java-meeting2.0/logs/
```
---
## 网络TCP连接状态分析
- ESTABLISHED: 77
- TIME_WAIT: 2 (正常)
- CLOSE_WAIT: 10 (正常)
**网络连通性:**
- 网关(192.168.1.1): 异常
- DNS解析: 正常
- 钉钉API: HTTP_CODE:200 TIME:0.127133s
- Java→MySQL: rtt min/avg/max/mdev = 0.060/0.060/0.060/0.000 ms
- Java→Redis: rtt min/avg/max/mdev = 0.063/0.063/0.063/0.000 ms
- Java→EMQX: rtt min/avg/max/mdev = 0.062/0.062/0.062/0.000 ms
---
## 系统日志统计(24小时)
- **内核错误:** 0
0
- **认证失败:** 267
- **磁盘错误:** 0
0
- **OOM事件:** 0
- **SSH暴力破解IP TOP5:**
- 25 1.71.254.57
- 22 115.151.72.100
- 14 60.188.115.114
- 9 1.71.254.50
- 7 180.184.160.246
**失败的服务:**
```
cloud-config.service loaded failed failed Apply the settings specified in cloud-config
cloud-final.service loaded failed failed Execute cloud user/final scripts
cloud-init-local.service loaded failed failed Initial cloud-init job (pre-networking)
cloud-init.service loaded failed failed Initial cloud-init job (metadata service crawler)
fail2ban.service loaded failed failed Fail2Ban Service
firewalld.service loaded failed failed firewalld - dynamic firewall daemon
networkd-dispatcher.service loaded failed failed Dispatcher daemon for systemd-networkd
nginx.service loaded failed failed nginx - High performance web server
unattended-upgrades.service loaded failed failed Unattended Upgrades Shutdown
```
---
## NTP时钟同步状态
- **时钟同步:** Local time: Fri 2026-05-15 06:25:12 CST
Universal time: Thu 2026-05-14 22:25:12 UTC
RTC time: Thu 2026-05-14 22:25:13
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
systemd-timesyncd.service active: no
RTC in local TZ: no
- **NTP源:** 210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 100.125.1.251 3 9 377 192 +1564ns[+2544ns] +/- 18ms
- **时钟偏差:** System time : 0.000002462 seconds fast of NTP time
Last offset : +0.000000980 seconds
RMS offset : 0.000003809 seconds
- **系统时间:** Fri May 15 06:25:12 CST 2026
---
## SSL证书有效期
- **HTTPS(443):** N/A
- **EMQX(8883):** notBefore=May 8 08:07:05 2020 GMT
notAfter=May 6 08:07:05 2030 GMT
subject=C = CN, ST = hangzhou, O = EMQ, CN = Server
---
## 定时任务
**Crontab:**
```
#*/3 * * * * /data/services/scripts/ujava2-startup.sh >> /var/log/ujava2-cron.log 2>&1
```
**Systemd定时器:**
```
Fri 2026-05-15 07:46:24 CST 1h 21min left Thu 2026-05-14 19:05:01 CST 11h ago motd-news.timer motd-news.service
Fri 2026-05-15 10:33:27 CST 4h 8min left Thu 2026-05-14 23:12:14 CST 7h ago apt-daily.timer apt-daily.service
Fri 2026-05-15 11:56:40 CST 5h 31min left Thu 2026-05-14 11:56:40 CST 18h ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
Sat 2026-05-16 06:03:43 CST 23h left Fri 2026-05-15 06:15:06 CST 10min ago apt-daily-upgrade.timer apt-daily-upgrade.service
Mon 2026-05-18 00:00:00 CST 2 days left Mon 2026-05-11 00:00:24 CST 4 days ago fstrim.timer fstrim.service
n/a n/a Wed 2025-11-12 10:29:35 CST 6 months 1 days ago ureadahead-stop.timer ureadahead-stop.service
```
---
## 安全检测摘要
- **SELinux:** N/A
- **防火墙:** 已配置
- **开放端口(TCP):** 30个
- **异常账户(UID=0):**
- **SSH配置:** #Port 22
#PermitRootLogin prohibit-password
MaxAuthTries 5
#PasswordAuthentication yes
# PasswordAuthentication. Depending on your PAM configuration,
# the setting of "PermitRootLogin without-password".
# PAM authentication, then enable this but set PasswordAuthentication
#GatewayPorts no
PermitRootLogin yes
PasswordAuthentication yes
---
## AI分析建议
1. [警告] Swap已使用: 1.4% - 建议关注
2. [警告] 总线程数: 1443 - 建议关注
3. [警告] Redis缓存命中率: 58.0% - 建议关注
4. [警告] 空密码账户: dmdba - 建议关注
5. [优化] 内存使用率78.7%,建议关注内存增长趋势,考虑增加内存或优化应用
---
## 与上次巡检对比分析
**上次巡检时间:** 2026-05-15 03:23:03
**本次巡检时间:** 2026-05-15 06:23:04
**关键指标变化:**
| 指标 | 上次值 | 本次值 | 变化 | 趋势 |
| :--- | :--- | :--- | :--- | :--- |
| CPU使用率 | 1.1% | 1.1% | +0.0% | ➡️ 持平 |
| 内存使用率 | 78.7% | 78.7% | +0.0% | ➡️ 持平 |
| Swap使用率 | 1.4% | 1.4% | +0.0% | ➡️ 持平 |
| 系统负载(1min) | 0.1 | 0.0 | -0.1 | 🟢 改善 |
| 总线程数 | 1419.0 | 1443.0 | +24.0 | 🔴 恶化 |
| 文件描述符使用率 | 0.9% | 0.9% | +0.0% | ➡️ 持平 |
| ESTABLISHED连接 | 78.0 | 77.0 | -1.0 | 🟢 改善 |
| TIME_WAIT连接 | 0.0 | 2.0 | +2.0 | 🔴 恶化 |
| Redis缓存命中率 | 58.1% | 58.0% | -0.1% | 🟢 改善 |
| Redis内存碎片率 | 3.4 | 3.1 | -0.3 | 🟢 改善 |
---
*报告生成时间: 2026-05-15 06:23:04*
*全深入巡检 v3 终极版 - 检测点数量: 120+*
\ No newline at end of file
# Simple test without signature
$webhook = "https://oapi.dingtalk.com/robot/send?access_token=27071a77f20da381e9a321653ec5f4dcf668bcf058c01162f28e3f1f8633386d"
$body = @{
msgtype = "text"
text = @{
content = "Test message without signature"
}
} | ConvertTo-Json -Depth 10
Write-Host "Sending simple test message..." -ForegroundColor Cyan
Write-Host "Webhook: $webhook" -ForegroundColor Yellow
try {
$response = Invoke-RestMethod -Uri $webhook -Method Post -Body $body -ContentType "application/json" -TimeoutSec 10
Write-Host "Response: $($response | ConvertTo-Json)" -ForegroundColor Green
if ($response.errcode -eq 0) {
Write-Host "SUCCESS!" -ForegroundColor Green
} else {
Write-Host "FAILED: errcode=$($response.errcode), errmsg=$($response.errmsg)" -ForegroundColor Red
}
} catch {
Write-Host "ERROR: $_" -ForegroundColor Red
}
......@@ -18,7 +18,7 @@
- 需要先判断该路径是否存在脚本,若不存在则不进行配置,打印相关日志记录。
- 新增定时任务:
- 定时周期:每周五凌晨1点执行
- 定时任务执行脚本:`/data/services/scripts/UbainsmysqlBakUp`
- 定时任务执行脚本:`/data/services/scripts/UbainsmysqlBakUp.sh`
- 需要先判断该路径是否存在脚本,若不存在则不进行配置,打印相关日志记录。
- 新增定时任务:
- 定时周期:*/5 * * * *
......@@ -39,6 +39,14 @@
- 定时周期:0 4 * * *
- 定时任务执行脚本:`/data/services/scripts/auto_clean_deleted_ubains_v3.sh`
- 需要先判断该路径是否存在脚本,若不存在则不进行配置,打印相关日志记录。
- 新增定时任务:
- 定时周期:*/3 * * * *
- 定时任务执行脚本:`/data/services/scripts/nacos-service.sh`
- 需要先判断该路径是否存在脚本,若不存在则不进行配置,打印相关日志记录。
- 新增定时任务:
- 定时周期:*/3 * * * *
- 定时任务执行脚本:`/data/services/scripts/ujava2-startup.sh`
- 需要先判断该路径是否存在脚本,若不存在则不进行配置,打印相关日志记录。
#### 参数控制设计
- **参数方式:** 使用 `--enable-xxx` / `--disable-xxx` 开关式参数
......
# 远程自动化部署_需求文档
## 相关资料要求
### 部署包路径
- ARM架构:\\192.168.9.9\发布版本\03服务器部署\临时使用-新统一平台\ARM部署包-请勿使用
- X86架构:\\192.168.9.9\发布版本\03服务器部署\临时使用-新统一平台\X86部署包\全量版
- ARM架构:已上传至对应服务器。
- X86架构:已上传至对应服务器。
### 目标服务器
- X86架构服务器:192.168.5.52 root Ubains@123
......
......@@ -27,7 +27,7 @@ TASK_LOG[check_health]=""
TASK_STATUS[check_health]=true # 默认启用
# mysql_backup 任务定义
TASK_CRON[mysql_backup]="0 0 * * 5"
TASK_CRON[mysql_backup]="0 1 * * 5"
TASK_SCRIPT[mysql_backup]="/data/services/scripts/UbainsmysqlBakUp.sh"
TASK_LOG[mysql_backup]=""
TASK_STATUS[mysql_backup]=true # 默认启用
......@@ -62,6 +62,12 @@ TASK_SCRIPT[auto_clean]="/data/services/scripts/auto_clean_deleted_ubains_v3.sh"
TASK_LOG[auto_clean]=""
TASK_STATUS[auto_clean]=true # 默认启用
# nacos_monitor 任务定义
TASK_CRON[nacos_monitor]="*/3 * * * *"
TASK_SCRIPT[nacos_monitor]="/data/services/scripts/nacos-service.sh"
TASK_LOG[nacos_monitor]=""
TASK_STATUS[nacos_monitor]=true # 默认启用
# health_check 任务定义(服务自检脚本,强制启用)
TASK_CRON[health_check]="0 0 * * *"
TASK_SCRIPT[health_check]="/data/services/scripts/check_health_shell/check_server_health.sh"
......@@ -120,6 +126,8 @@ function show_help() {
--disable-mysql-logs-backup 禁用 mysql_logs_backup 定时任务
--enable-auto-clean 启用 auto_clean 定时任务
--disable-auto-clean 禁用 auto_clean 定时任务
--enable-nacos-monitor 启用 nacos_monitor 定时任务
--disable-nacos-monitor 禁用 nacos_monitor 定时任务
-h, --help 显示此帮助信息
注意:
......@@ -134,6 +142,7 @@ function show_help() {
$0 --enable-mysql-backup # 启用数据库备份
$0 --disable-monitor-redis --disable-monitor-emqx # 禁用监控任务
$0 --enable-ujava2 --enable-check-health --enable-mysql-backup # 显式启用所有任务
$0 --disable-nacos-monitor # 禁用 nacos 监控任务
示例(函数方式):
source $0 # 导入脚本
......@@ -141,6 +150,7 @@ function show_help() {
add_crontab_job --disable-ujava2 # 禁用 ujava2-startup
add_crontab_job --enable-mysql-backup # 启用数据库备份
add_crontab_job --disable-monitor-redis --disable-monitor-emqx # 禁用监控任务
add_crontab_job --enable-nacos-monitor # 启用 nacos 监控任务
EOF
}
......@@ -240,6 +250,17 @@ function parse_arguments() {
TASK_STATUS[auto_clean]=false
fi
;;
--enable-nacos-monitor)
TASK_STATUS[nacos_monitor]=true
;;
--disable-nacos-monitor)
if [[ "${TASK_STATUS[nacos_monitor]}" == "false" ]]; then
log "WARN" "⚠️ 参数冲突:nacos_monitor 同时被启用和禁用,跳过该任务"
TASK_STATUS[nacos_monitor]=conflict
else
TASK_STATUS[nacos_monitor]=false
fi
;;
-h|--help)
show_help
exit 0
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论