feat: 新增设备巡检模块实现完整的巡检告警功能

新增设备巡检模块核心功能,包括:
- 巡检数据存储与调度系统
- 华为/H3C交换机及Linux服务器采集器
- 设备扩展配置与告警规则管理
- 主机详情页巡检配置入口
- 产品名称自定义设置功能
- 网络设备SSH exec通道兼容处理
This commit is contained in:
2026-10-09 10:37:48 +08:00
parent 9202506c46
commit c64e00d835
75 changed files with 12087 additions and 446 deletions

View File

@@ -136,6 +136,20 @@ function createExecOnSessionApi(ctx) {
});
}
// [NETWORK-DEVICE GATE] 网络设备(华为 VRP、H3C Comware 等)SSH server 通常
// 不支持在同一连接上开多个 channel——exec channel 会触发整个连接被断开。
// 从 SSH banner (remoteSshVersion) 检测,如果是网络设备就直接拒绝。
const remoteVer = String(session?.remoteSshVersion || '').toLowerCase();
const isNetworkDeviceSsh = /^H3C[-_\s]/i.test(session?.remoteSshVersion || '')
|| /^Comware-/i.test(session?.remoteSshVersion || '')
|| /^HUAWEI[-_]/i.test(session?.remoteSshVersion || '')
|| /^VRP-/i.test(session?.remoteSshVersion || '')
|| (session?.remoteSshVersion === '-')
|| /^Cisco[-_]|^CiscoIOS_/i.test(session?.remoteSshVersion || '');
if (isNetworkDeviceSsh) {
return { success: false, error: "SSH exec channel not supported on network device (Huawei/H3C/VRP)" };
}
const conn = await resolveExecConnection(session, sessionId, event);
if (!conn) {
if (session?.type === "mosh" && !session.moshStatsAuth && !session.moshStatsConnFailed) {