新增 auto-check 工具:网段扫描+SSH登录+压力测试永久循环工作流

- pkg/discovery: TCP端口探测存活主机,ARP表解析MAC作为设备唯一标识
- pkg/sshclient: SSH连接(密码/密钥认证)与远程命令执行
- pkg/stress: stress-ng/stressapptest 压测(cpu/memory/disk/memnative/full)+温度与dmesg监控
- pkg/report: 检测报告生成(文本/JSON)
- pkg/workflow: 永久循环工作流(间隔可配),MAC唯一标识设备,增量测试+状态变化打印
- pkg/config: YAML分类配置(scan/ssh/stress/report/workflow)
- cmd: cobra入口,仅 --config 指定配置文件
This commit is contained in:
张威33321
2026-08-10 20:30:23 +08:00
parent c6d83a4a94
commit 19f6050147
18 changed files with 2077 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
# auto-check 配置文件
# 所有参数仅从本文件加载,按分类组织
# --- 网段扫描 ---
scan:
cidr: "192.168.1.0/24"
timeout: 3s
concurrency: 50
# --- SSH 认证 ---
ssh:
user: "root"
password: ""
key: ""
port: 22
# --- 压力测试 ---
stress:
types: "cpu,memory"
duration: 30s
threads: 4
# --- 工作流 ---
workflow:
interval: 10s
# --- 报告 ---
report:
path: "reports"