Compare commits
12 Commits
wangzuwang
...
main
| Author | SHA1 | Date |
|---|---|---|
|
|
327d4f37a4 | 3 days ago |
|
|
ed368d465c | 4 days ago |
|
|
8715b46e5d | 4 days ago |
|
|
a8e96c3bc0 | 5 days ago |
|
|
303f17ede3 | 5 days ago |
|
|
9629af961f | 5 days ago |
|
|
d9e8e6b578 | 5 days ago |
|
|
1f262cf9a7 | 5 days ago |
|
|
5a30c9c849 | 5 days ago |
|
|
e8f2786ce0 | 5 days ago |
|
|
5baedd5d00 | 5 days ago |
|
|
5d2014516d | 5 days ago |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
nohup: ignoring input
|
||||
time="2026-01-04T05:01:29.583454678Z" level=info msg="Start initial configuration in progress"
|
||||
time="2026-01-04T05:01:29.584823865Z" level=info msg="Geodata Loader mode: memconservative"
|
||||
time="2026-01-04T05:01:29.584846097Z" level=info msg="Geosite Matcher implementation: succinct"
|
||||
time="2026-01-04T05:01:29.585254618Z" level=info msg="Can't find MMDB, start download"
|
||||
time="2026-01-04T05:01:32.229953886Z" level=info msg="Initial configuration complete, total time: 2646ms"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
@ -1,29 +1,51 @@
|
||||
@startuml
|
||||
title 日志诊断与自动修复流程
|
||||
title 核心业务流程时序图 (Updated)
|
||||
|
||||
actor User
|
||||
actor Admin
|
||||
participant Frontend as FE
|
||||
participant FastAPI as API
|
||||
participant Flume
|
||||
database MySQL as DB
|
||||
queue Redis
|
||||
participant "FastAPI Auth" as Auth
|
||||
participant "FastAPI Diagnosis" as Diag
|
||||
participant "Agents (DA/PA/RA)" as Agents
|
||||
database PostgreSQL as DB
|
||||
participant LLM
|
||||
participant "Hadoop Cluster" as Cluster
|
||||
|
||||
Flume -> API : 推送结构化日志
|
||||
API -> DB : 写入 fault_record
|
||||
FE -> API : 查询 /api/logs/query
|
||||
API -> FE : 返回日志列表
|
||||
== 用户注册与审批 ==
|
||||
User -> FE : 提交注册信息
|
||||
FE -> Auth : POST /api/auth/register
|
||||
Auth -> DB : 写入用户 (status=pending)
|
||||
Admin -> FE : 查看审批队列
|
||||
FE -> Auth : GET /api/auth/pending_users
|
||||
Auth -> DB : 查询
|
||||
Admin -> FE : 批准注册
|
||||
FE -> Auth : POST /api/auth/approve/{uid}
|
||||
Auth -> DB : 更新用户 (status=active)
|
||||
User -> FE : 登录 (正确/错误凭据)
|
||||
FE -> Auth : POST /api/auth/login
|
||||
Auth -> DB : 校验
|
||||
Auth -> FE : 返回 JWT / 错误提示
|
||||
|
||||
API -> LLM : call_llm_diagnose(logs)
|
||||
LLM --> API : 返回 FixCommand(JSON)
|
||||
API -> DB : 写入 exec_log
|
||||
API -> Redis : 缓存/发布修复任务
|
||||
API -> FE : WebSocket 推送诊断结果
|
||||
== 故障诊断与自动修复 ==
|
||||
Cluster -> Diag : 推送日志 (Flume/SSH)
|
||||
Diag -> DB : 记录 Fault (status=detected)
|
||||
User -> FE : 点击 "AI 诊断"
|
||||
FE -> Diag : POST /api/diagnosis/trigger
|
||||
Diag -> Agents : 调用 DiagnosisAgent
|
||||
Agents -> LLM : 分析日志上下文
|
||||
LLM -> Agents : 返回根因与建议 (FixCommand)
|
||||
Agents -> Diag : 诊断结果 (Risk Level)
|
||||
Diag -> DB : 更新 Fault (status=analyzing)
|
||||
Diag -> FE : WebSocket 推送报告
|
||||
|
||||
FE -> API : /api/repair/execute
|
||||
API -> "修复脚本" : 执行Shell/Hadoop命令
|
||||
"修复脚本" -> API : stdout/stderr
|
||||
API -> DB : 更新 exec_log
|
||||
API -> FE : 返回执行结果
|
||||
User -> FE : 确认执行修复 (High risk needs approval)
|
||||
FE -> Diag : POST /api/repair/execute
|
||||
Diag -> Agents : 调用 PolicyAgent (评估风险)
|
||||
Agents -> Agents : 调用 RepairAgent
|
||||
Agents -> Cluster : SSH 执行修复脚本
|
||||
Cluster -> Agents : 返回 stdout/stderr
|
||||
Agents -> Diag : 修复完成
|
||||
Diag -> DB : 记录 ExecLog & 更新 Fault (status=resolved/failed)
|
||||
Diag -> FE : 推送最终结果
|
||||
|
||||
@enduml
|
||||
|
After Width: | Height: | Size: 36 KiB |
@ -1,36 +1,52 @@
|
||||
@startuml
|
||||
title 故障检测系统总体架构
|
||||
title 故障检测系统总体架构 (Aligned with Backend)
|
||||
|
||||
node "Hadoop Cluster" {
|
||||
[NameNode]
|
||||
[DataNode] as DN1
|
||||
[DataNode] as DN2
|
||||
[ResourceManager]
|
||||
[DataNode / NodeManager] as Node
|
||||
}
|
||||
|
||||
cloud "Flume Agents" as Flume
|
||||
Flume --> DN1 : 采集HDFS/YARN日志
|
||||
Flume --> DN2 : 采集HDFS/YARN日志
|
||||
cloud "Log & Metrics Collection" {
|
||||
[Flume Agent] as Flume
|
||||
[SSH Probe Service] as Probe
|
||||
Flume --> Node : 采集 Hadoop 日志
|
||||
Probe --> Node : 采集系统指标 (CPU/Mem/Disk)
|
||||
}
|
||||
|
||||
component "FastAPI Service" as API
|
||||
database "PostgreSQL" as DB
|
||||
queue "Redis" as Cache
|
||||
API --> DB : 写入/查询故障记录
|
||||
API --> Cache : 状态缓存/队列
|
||||
API --> "LLM Diagnose" : 调用大模型\n返回FixCommand
|
||||
package "Backend Service (FastAPI)" {
|
||||
component "Auth Router" as Auth
|
||||
component "Cluster/Node Router" as ClusterSvc
|
||||
component "Fault/Log Router" as FaultSvc
|
||||
component "AI/Chat Router" as ChatSvc
|
||||
|
||||
component "Orchestrator" as Orchestrator
|
||||
component "DiagnosisAgent" as DA
|
||||
component "PolicyAgent" as PA
|
||||
component "RepairAgent" as RA
|
||||
|
||||
Auth --> [PostgreSQL] : users
|
||||
ClusterSvc --> [PostgreSQL] : clusters, nodes
|
||||
FaultSvc --> [PostgreSQL] : fault_records, hadoop_exec_logs
|
||||
ChatSvc --> [PostgreSQL] : chat_sessions, chat_messages
|
||||
|
||||
Orchestrator --> DA
|
||||
Orchestrator --> PA
|
||||
Orchestrator --> RA
|
||||
|
||||
DA --> [LLM Service] : LangChain / OpenAI
|
||||
RA --> [Hadoop Cluster] : SSH (Paramiko)
|
||||
}
|
||||
|
||||
component "Agent Orchestrator" as Orchestrator
|
||||
component "Diagnosis Agent" as DA
|
||||
component "Repair Agent" as RA
|
||||
component "Policy Agent" as PA
|
||||
API --> Orchestrator : 触发诊断/修复流程
|
||||
Orchestrator --> DA : 传递结构化日志
|
||||
Orchestrator --> PA : 风险评估与审批策略
|
||||
Orchestrator --> RA : 下发修复命令
|
||||
DA --> "LLM Diagnose" : 调用LLM分析
|
||||
RA --> Cluster : SSH/命令执行
|
||||
package "Frontend (Vue 3)" {
|
||||
component "Dashboard" as Dash
|
||||
component "Diagnosis Chat" as DiagUI
|
||||
component "Admin UI" as Admin
|
||||
}
|
||||
|
||||
component "Frontend Web (Vue/React + ECharts)" as FE
|
||||
FE --> API : /api/cluster/status\n/api/logs/query\n/api/diagnosis/result\n/api/repair/execute
|
||||
API --> FE : WebSocket推送状态/诊断结果
|
||||
Dash --> ClusterSvc
|
||||
DiagUI --> ChatSvc
|
||||
Admin --> Auth
|
||||
|
||||
Orchestrator ..> [Redis] : 任务状态与实时推送
|
||||
@enduml
|
||||
|
After Width: | Height: | Size: 10 KiB |
@ -1,45 +1,36 @@
|
||||
@startuml
|
||||
title 日志诊断与自动修复 - 活动图
|
||||
title 故障生命周期状态机与修复流程 (Updated)
|
||||
|
||||
skinparam defaultFontName Microsoft YaHei
|
||||
|
||||
start
|
||||
:Flume采集日志;
|
||||
:FastAPI接收并解析日志;
|
||||
:保存 FaultRecord 到 MySQL;
|
||||
(*) --> "Detected (故障发现)" : 系统采集到异常日志/指标
|
||||
|
||||
partition "用户/系统触发" {
|
||||
if (是否需要诊断?) then (是)
|
||||
:聚合相关日志;
|
||||
:构造 Prompt;
|
||||
:调用 LLM 诊断;
|
||||
:生成 FixCommand(JSON);
|
||||
:安全校验(禁止高危命令);
|
||||
else (否)
|
||||
:等待新日志/用户请求;
|
||||
stop
|
||||
endif
|
||||
partition "AI 诊断阶段" {
|
||||
"Detected (故障发现)" --> "Analyzing (正在分析)" : 触发 AI 诊断 (DiagnosisAgent)
|
||||
"Analyzing (正在分析)" --> "Diagnosed (已生成建议)" : LLM 分析完成并生成 FixCommand
|
||||
}
|
||||
|
||||
if (风险等级 == high?) then (是)
|
||||
:前端弹窗请求人工确认;
|
||||
if (用户确认执行?) then (是)
|
||||
:继续执行修复;
|
||||
else (否)
|
||||
:记录并通知未执行;
|
||||
stop
|
||||
partition "策略评估与修复阶段" {
|
||||
"Diagnosed (已生成建议)" --> "Risk Assessment (PolicyAgent)"
|
||||
|
||||
if "风险等级" then
|
||||
-->[High] "Pending Approval (待审批)"
|
||||
-->[Approved] "Repairing (修复中)"
|
||||
else
|
||||
-->[Low/Medium] "Repairing (修复中)"
|
||||
endif
|
||||
endif
|
||||
|
||||
"Repairing (修复中)" --> "Executing (RepairAgent)"
|
||||
"Executing (RepairAgent)" --> "Post-Check (修复后校验)"
|
||||
}
|
||||
|
||||
:修复前预检查(配置/路径/权限);
|
||||
if (预检查通过?) then (是)
|
||||
:执行修复脚本;
|
||||
:采集stdout/stderr;
|
||||
:保存 ExecLog 到 MySQL;
|
||||
:更新状态到 Redis 并推送 WebSocket;
|
||||
else (否)
|
||||
:记录失败原因;
|
||||
"Post-Check (修复后校验)" --> if "是否修复成功?" then
|
||||
-->[Yes] "Resolved (已解决)"
|
||||
--> (*)
|
||||
else
|
||||
-->[No] "Failed (修复失败)"
|
||||
--> "Manual Intervention (需人工介入)"
|
||||
--> (*)
|
||||
endif
|
||||
|
||||
:返回结果给前端;
|
||||
stop
|
||||
@enduml
|
||||
|
After Width: | Height: | Size: 22 KiB |
@ -1,38 +1,42 @@
|
||||
@startuml
|
||||
title 故障检测系统 - 用例图
|
||||
skinparam defaultFontName Microsoft YaHei
|
||||
|
||||
actor 运维工程师 as Ops
|
||||
actor 前端用户 as User
|
||||
actor 测试工程师 as QA
|
||||
|
||||
rectangle "故障检测系统" {
|
||||
usecase "查看集群状态" as UC_Status
|
||||
usecase "查询日志" as UC_QueryLogs
|
||||
usecase "发起故障诊断" as UC_Diagnose
|
||||
usecase "执行自动修复" as UC_Repair
|
||||
usecase "查看执行日志" as UC_ExecLogs
|
||||
usecase "配置Flume收集" as UC_ConfigFlume
|
||||
usecase "配置告警阈值" as UC_ConfigAlert
|
||||
usecase "导出故障与诊断报告" as UC_Export
|
||||
usecase "生成FixCommand" as UC_FixCmd
|
||||
usecase "命令安全校验" as UC_SafeCheck
|
||||
title 故障检测系统用例图 (Updated)
|
||||
|
||||
User --> UC_Status
|
||||
User --> UC_QueryLogs
|
||||
User --> UC_Diagnose
|
||||
User --> UC_Repair
|
||||
User --> UC_ExecLogs
|
||||
skinparam defaultFontName Microsoft YaHei
|
||||
|
||||
Ops --> UC_ConfigFlume
|
||||
Ops --> UC_ConfigAlert
|
||||
Ops --> UC_Repair
|
||||
Ops --> UC_Status
|
||||
actor "访客" as Guest
|
||||
actor "管理员" as Admin
|
||||
actor "运维人员/操作员" as Operator
|
||||
actor "观察员" as Observer
|
||||
|
||||
QA --> UC_QueryLogs
|
||||
QA --> UC_Export
|
||||
rectangle "故障检测与诊断系统" {
|
||||
(注册与登录) as UC_Auth
|
||||
(注册审批) as UC_Approve
|
||||
(集群管理) as UC_Cluster
|
||||
(实时监控) as UC_Monitor
|
||||
(日志检索) as UC_Logs
|
||||
(AI 故障诊断) as UC_Diag
|
||||
(自动/手动修复) as UC_Repair
|
||||
(操作审计) as UC_Audit
|
||||
(用户权限管理) as UC_UserMgmt
|
||||
|
||||
UC_Diagnose --> UC_FixCmd : <<include>>
|
||||
UC_Repair --> UC_SafeCheck : <<include>>
|
||||
Guest --> UC_Auth
|
||||
|
||||
Admin --> UC_Approve
|
||||
Admin --> UC_UserMgmt
|
||||
Admin --> UC_Audit
|
||||
Admin --> UC_Cluster
|
||||
|
||||
Operator --> UC_Monitor
|
||||
Operator --> UC_Logs
|
||||
Operator --> UC_Diag
|
||||
Operator --> UC_Repair
|
||||
Operator --> UC_Cluster
|
||||
|
||||
Observer --> UC_Monitor
|
||||
Observer --> UC_Logs
|
||||
|
||||
UC_Diag ..> (LLM 根因分析) : <<include>>
|
||||
UC_Repair ..> (风险评估审批) : <<include>>
|
||||
}
|
||||
|
||||
@enduml
|
||||
|
After Width: | Height: | Size: 54 KiB |
@ -1,130 +1,112 @@
|
||||
@startuml
|
||||
title 故障检测与自动修复 - 类图
|
||||
skinparam backgroundColor #FFFFFF
|
||||
skinparam defaultFontName Microsoft YaHei
|
||||
skinparam classAttributeIconSize 0
|
||||
|
||||
class FlumeAgent {
|
||||
+config : Map
|
||||
+start()
|
||||
+stop()
|
||||
}
|
||||
|
||||
class LogEvent {
|
||||
+timestamp : datetime
|
||||
+host : string
|
||||
+source : string
|
||||
+level : string
|
||||
+message : string
|
||||
+raw : text
|
||||
}
|
||||
|
||||
class FastAPIService {
|
||||
+ingestLog(e: LogEvent)
|
||||
+getClusterStatus()
|
||||
+queryLogs(filter)
|
||||
+diagnose(logs)
|
||||
+executeRepair(cmd: FixCommand)
|
||||
}
|
||||
|
||||
class DiagnosisService {
|
||||
+callLLM(logs) : FixCommand
|
||||
+validateCommand(cmd: FixCommand) : bool
|
||||
}
|
||||
|
||||
class LLMClient {
|
||||
+apiKey : string
|
||||
+endpoint : string
|
||||
+invoke(prompt) : string
|
||||
}
|
||||
|
||||
class FixCommand {
|
||||
+fault_type : string
|
||||
+reason : string
|
||||
+fix_script : string
|
||||
+risk_level : RiskLevel
|
||||
}
|
||||
|
||||
enum RiskLevel {
|
||||
low
|
||||
medium
|
||||
high
|
||||
}
|
||||
|
||||
class RepairExecutor {
|
||||
+run(script) : ExecResult
|
||||
+precheck() : bool
|
||||
}
|
||||
|
||||
class ExecResult {
|
||||
+stdout : text
|
||||
+stderr : text
|
||||
+exitCode : int
|
||||
}
|
||||
|
||||
class FaultRecord {
|
||||
+id : int
|
||||
+fault_type : string
|
||||
+reason : string
|
||||
+timestamp : datetime
|
||||
+node : string
|
||||
}
|
||||
|
||||
class ExecLog {
|
||||
+id : int
|
||||
+record_id : int
|
||||
+stdout : text
|
||||
+stderr : text
|
||||
+timestamp : datetime
|
||||
}
|
||||
|
||||
class MySQLClient {
|
||||
+saveFault(record: FaultRecord)
|
||||
+saveExecLog(log: ExecLog)
|
||||
+queryLogs(filter)
|
||||
}
|
||||
|
||||
class RedisCache {
|
||||
+set(key, value)
|
||||
+publish(channel, msg)
|
||||
+get(key)
|
||||
}
|
||||
|
||||
class ClusterStatus {
|
||||
+nodesUp : int
|
||||
+nodesDown : int
|
||||
+hdfsUsage : float
|
||||
+yarnActiveApps : int
|
||||
}
|
||||
title 故障检测与自动修复 - 领域模型类图 (Updated from Code)
|
||||
|
||||
class FrontendWeb {
|
||||
+viewStatus()
|
||||
+queryLogs()
|
||||
+requestDiagnosis()
|
||||
+executeRepair()
|
||||
}
|
||||
skinparam classAttributeIconSize 0
|
||||
|
||||
FlumeAgent --> FastAPIService : push(LogEvent)
|
||||
FastAPIService --> DiagnosisService : diagnose(logs)
|
||||
DiagnosisService --> LLMClient : call_llm_diagnose
|
||||
DiagnosisService --> FixCommand : returns
|
||||
FastAPIService --> RepairExecutor : execute(FixCommand)
|
||||
RepairExecutor --> ExecResult : returns
|
||||
FastAPIService --> MySQLClient : save FaultRecord/ExecLog
|
||||
FastAPIService --> RedisCache : cache/publish status
|
||||
FrontendWeb --> FastAPIService : REST/WebSocket
|
||||
FastAPIService --> ClusterStatus : compose
|
||||
MySQLClient --> FaultRecord
|
||||
MySQLClient --> ExecLog
|
||||
FixCommand --> RiskLevel
|
||||
package "Models (SQLAlchemy)" {
|
||||
class User {
|
||||
+id : int <<PK>>
|
||||
+username : string
|
||||
+email : string
|
||||
+password_hash : string
|
||||
+full_name : string
|
||||
+is_active : bool
|
||||
+last_login : TIMESTAMP
|
||||
+created_at : TIMESTAMP
|
||||
}
|
||||
|
||||
class Cluster {
|
||||
+id : int <<PK>>
|
||||
+uuid : string <<Unique>>
|
||||
+name : string
|
||||
+type : string
|
||||
+node_count : int
|
||||
+health_status : string
|
||||
+cpu_avg : float
|
||||
+memory_avg : float
|
||||
+namenode_ip : INET
|
||||
+rm_ip : INET
|
||||
+config_info : JSONB
|
||||
+to_dict() : dict
|
||||
}
|
||||
|
||||
class Node {
|
||||
+id : int <<PK>>
|
||||
+uuid : string <<Unique>>
|
||||
+cluster_id : int <<FK>>
|
||||
+hostname : string
|
||||
+ip_address : INET
|
||||
+ssh_user : string
|
||||
+ssh_password : string
|
||||
+status : string
|
||||
+cpu_usage : float
|
||||
+memory_usage : float
|
||||
+disk_usage : float
|
||||
+last_heartbeat : TIMESTAMP
|
||||
}
|
||||
|
||||
class FaultRecord {
|
||||
+id : int <<PK>>
|
||||
+fault_id : string <<Unique>>
|
||||
+cluster_id : int <<FK>>
|
||||
+fault_type : string
|
||||
+fault_level : string
|
||||
+title : string
|
||||
+description : string
|
||||
+affected_nodes : JSONB
|
||||
+affected_clusters : JSONB
|
||||
+root_cause : string
|
||||
+repair_suggestion : string
|
||||
+status : string
|
||||
+reporter : string
|
||||
+to_dict() : dict
|
||||
}
|
||||
|
||||
class HadoopExecLog {
|
||||
+id : int <<PK>>
|
||||
+from_user_id : int <<FK>>
|
||||
+cluster_name : string
|
||||
+description : text
|
||||
+start_time : TIMESTAMP
|
||||
+end_time : TIMESTAMP
|
||||
+to_dict() : dict
|
||||
}
|
||||
|
||||
class ChatSession {
|
||||
+id : string <<PK>> (UUID)
|
||||
+user_id : int <<FK>>
|
||||
+title : string
|
||||
+created_at : DateTime
|
||||
+messages : List<ChatMessage>
|
||||
}
|
||||
|
||||
class ChatMessage {
|
||||
+id : int <<PK>>
|
||||
+session_id : string <<FK>>
|
||||
+role : string (system/user/assistant/tool)
|
||||
+content : text
|
||||
+created_at : DateTime
|
||||
}
|
||||
}
|
||||
|
||||
package "Agents (Logic)" {
|
||||
class DiagnosisAgent {
|
||||
+analyze(logs) : FixCommand
|
||||
}
|
||||
|
||||
class PolicyAgent {
|
||||
+evaluate(cmd) : RiskLevel
|
||||
}
|
||||
|
||||
class RepairAgent {
|
||||
+execute(cmd) : ExecResult
|
||||
}
|
||||
}
|
||||
|
||||
User "1" -- "0..*" HadoopExecLog : executes
|
||||
User "1" -- "0..*" ChatSession : owns
|
||||
Cluster "1" -- "0..*" Node : contains
|
||||
Cluster "1" -- "0..*" FaultRecord : has
|
||||
ChatSession "1" -- "0..*" ChatMessage : has_many
|
||||
|
||||
note right of FixCommand
|
||||
JSON 示例:
|
||||
{
|
||||
fault_type: "DataNode故障",
|
||||
reason: "磁盘占满",
|
||||
fix_script: "ssh dn 'clean_temp.sh'",
|
||||
risk_level: "medium"
|
||||
}
|
||||
end note
|
||||
@enduml
|
||||
|
After Width: | Height: | Size: 24 KiB |
@ -1,25 +1,35 @@
|
||||
@startuml
|
||||
title 部署拓扑
|
||||
title 故障检测系统部署拓扑 (Updated)
|
||||
|
||||
node "On-Prem / Cloud" {
|
||||
node "Hadoop Cluster" {
|
||||
[NameNode]
|
||||
[DataNodes...]
|
||||
}
|
||||
node "Hadoop Cluster Node" {
|
||||
component "Hadoop Components" as HC
|
||||
component "Flume Agent" as Flume
|
||||
HC - [SSH]
|
||||
}
|
||||
|
||||
node "Logging Layer" {
|
||||
[Flume Agents]
|
||||
node "Management Server" {
|
||||
package "Backend (Docker Container)" {
|
||||
[FastAPI Service] as API
|
||||
[Celery Workers] as Workers
|
||||
}
|
||||
|
||||
node "Application Layer" {
|
||||
[FastAPI]
|
||||
[LLM Connector]
|
||||
[Nginx for Frontend]
|
||||
|
||||
package "Frontend (Docker Container)" {
|
||||
[Nginx / Vue App] as Web
|
||||
}
|
||||
|
||||
database "PostgreSQL" as DB
|
||||
queue "Redis" as Redis
|
||||
}
|
||||
|
||||
node "Storage/Caching" {
|
||||
[MySQL]
|
||||
[Redis]
|
||||
}
|
||||
cloud "AI Platform" {
|
||||
[OpenAI API / LangChain] as LLM
|
||||
}
|
||||
|
||||
Web --> API : HTTP/WebSocket
|
||||
API --> DB : Persistence
|
||||
API --> Redis : Task Queue
|
||||
API --> LLM : AI Analysis
|
||||
API --> HC : SSH Execution
|
||||
Flume --> API : Log Streaming
|
||||
|
||||
@enduml
|
||||
Binary file not shown.
@ -0,0 +1,65 @@
|
||||
# 基于 Hadoop 的故障检测与智能诊断项目 - 测试报告
|
||||
|
||||
## 修订记录
|
||||
|
||||
| 版本号 | 修订日期 | 修订内容 | 修订人 |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| v1.0.0 | 2026-01-10 | 初始测试报告框架创建 | AI Assistant |
|
||||
|
||||
---
|
||||
|
||||
## 1. 测试概述
|
||||
|
||||
### 1.1 测试目的
|
||||
验证系统在 Hadoop 集群管理、指标采集、日志检索及 AI 诊断功能上的正确性、稳定性和响应速度,确保满足《需求规格说明书》中的定义。
|
||||
|
||||
### 1.2 测试范围
|
||||
- **功能测试**: 集群注册、SSH 校验、日志同步、AI SSE 流式对话。
|
||||
- **性能测试**: 大规模日志检索响应时间、多并发指标采集压力。
|
||||
|
||||
## 2. 测试环境
|
||||
|
||||
| 类别 | 配置要求 |
|
||||
| :--- | :--- |
|
||||
| **硬件** | 8 vCPU, 16GB RAM (测试服务器) |
|
||||
| **软件** | Docker, PostgreSQL 14, Python 3.10 |
|
||||
| **集群环境** | Hadoop 3.1.3 (1 NameNode, 5 DataNodes) |
|
||||
|
||||
## 3. 测试用例
|
||||
|
||||
| 用例编号 | 功能模块 | 测试点 | 预期结果 | 状态 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| TC-01 | 集群管理 | 输入合法的 SSH 信息注册集群 | 注册成功并自动发现所有节点 | [待测试] |
|
||||
| TC-02 | 日志采集 | 模拟节点产生 ERROR 日志 | 数据库 5 秒内出现对应增量日志 | [待测试] |
|
||||
| TC-03 | AI 诊断 | 询问集群负载情况 | AI 正确调用指标工具并给出分析建议 | [待测试] |
|
||||
|
||||
## 4. 测试结果
|
||||
|
||||
### 4.1 通过/失败统计
|
||||
- **总用例数**: 0
|
||||
- **通过数**: 0
|
||||
- **失败数**: 0
|
||||
- **跳过数**: 0
|
||||
- **通过率**: 0%
|
||||
|
||||
## 5. 缺陷分析
|
||||
|
||||
### 5.1 严重等级分布
|
||||
- **致命 (Blocker)**: 0
|
||||
- **严重 (Critical)**: 0
|
||||
- **一般 (Major)**: 0
|
||||
- **次要 (Minor)**: 0
|
||||
|
||||
## 6. 测试结论
|
||||
|
||||
### 6.1 质量评估
|
||||
[在此填写本次测试阶段的总体质量评价,例如:系统核心流程已打通,但 AI 诊断在极端日志量下存在响应延迟。]
|
||||
|
||||
## 7. 附录
|
||||
|
||||
### 7.1 测试日志
|
||||
- 后端服务日志: `backend/logs/test_run.log`
|
||||
- 采集器性能统计: `docs/metrics_report.csv`
|
||||
|
||||
### 7.2 截图
|
||||
[占位符:插入关键功能运行截图]
|
||||
Binary file not shown.
@ -1,68 +0,0 @@
|
||||
# Git 隐藏历史 (Reflog)
|
||||
|
||||
| 日期 | 版本 (Hash) | 操作/消息 |
|
||||
| :--- | :--- | :--- |
|
||||
| 2025-12-29 14:48:30 +0000 | `22e4772` | pull --rebase origin develop (finish): returning to refs/heads/develop |
|
||||
| 2025-12-29 14:48:30 +0000 | `22e4772` | pull --rebase origin develop (pick): 集群注册_容器ssh连接问题修复 |
|
||||
| 2025-12-29 14:48:30 +0000 | `f0fccd5` | pull --rebase origin develop (start): checkout f0fccd5c6083cd4dd5a433f4322b318874d3e02b |
|
||||
| 2025-12-29 14:46:10 +0000 | `8bbf7bb` | commit: 集群注册_容器ssh连接问题修复 |
|
||||
| 2025-12-29 13:32:14 +0000 | `742b1d0` | pull --rebase origin develop (finish): returning to refs/heads/develop |
|
||||
| 2025-12-29 13:32:14 +0000 | `742b1d0` | pull --rebase origin develop (pick): 流式输出优化 |
|
||||
| 2025-12-29 13:32:14 +0000 | `a570f82` | pull --rebase origin develop (start): checkout a570f82e9785853c862ed22bf7f6389d666865af |
|
||||
| 2025-12-29 13:31:41 +0000 | `c6a821d` | commit: 流式输出优化 |
|
||||
| 2025-12-29 13:13:50 +0000 | `d4c7cf8` | pull --rebase origin develop (finish): returning to refs/heads/develop |
|
||||
| 2025-12-29 13:13:50 +0000 | `d4c7cf8` | pull --rebase origin develop (pick): ai聊天流式输出_后端 |
|
||||
| 2025-12-29 13:13:50 +0000 | `630f637` | pull --rebase origin develop (start): checkout 630f6375f7967824dae3b1bd25b9148f83d79d5c |
|
||||
| 2025-12-29 13:11:31 +0000 | `47be97e` | commit: ai聊天流式输出_后端 |
|
||||
| 2025-12-29 11:40:41 +0000 | `a48ae19` | commit: ai联网搜索功能修复 |
|
||||
| 2025-12-29 11:40:36 +0000 | `28381d4` | commit: ai联网搜索功能修复 |
|
||||
| 2025-12-29 11:27:20 +0000 | `e3d18fa` | pull origin develop --rebase (finish): returning to refs/heads/develop |
|
||||
| 2025-12-29 11:27:20 +0000 | `e3d18fa` | pull origin develop --rebase (pick): feat: add description field to cluster registration and fix 500 error |
|
||||
| 2025-12-29 11:27:20 +0000 | `d52b431` | pull origin develop --rebase (start): checkout d52b431e259798a202afac720292fd4a60fc4e65 |
|
||||
| 2025-12-29 11:27:19 +0000 | `ddacc09` | commit: feat: add description field to cluster registration and fix 500 error |
|
||||
| 2025-12-29 11:25:01 +0000 | `b2524d6` | pull origin develop (finish): returning to refs/heads/develop |
|
||||
| 2025-12-29 11:25:01 +0000 | `b2524d6` | pull origin develop (start): checkout b2524d6ce332061456112fe2e2c7dd57cc61aac6 |
|
||||
| 2025-12-29 11:21:28 +0000 | `7e74e4d` | commit: 注册集群后端(无连接判断) |
|
||||
| 2025-12-29 10:14:34 +0000 | `f62455b` | merge test_ai: Fast-forward |
|
||||
| 2025-12-29 10:13:09 +0000 | `b49b2f7` | checkout: moving from test_ai to develop |
|
||||
| 2025-12-29 10:10:02 +0000 | `f62455b` | pull origin develop (finish): returning to refs/heads/test_ai |
|
||||
| 2025-12-29 10:10:02 +0000 | `f62455b` | pull origin develop (pick): ai功能修复_联网搜索工具 |
|
||||
| 2025-12-29 10:10:02 +0000 | `3ae20a5` | pull origin develop (start): checkout 3ae20a5f67c847e6e3b497b95a09916d7472f946 |
|
||||
| 2025-12-29 10:03:59 +0000 | `b688b37` | commit: ai功能修复_联网搜索工具 |
|
||||
| 2025-12-29 09:19:26 +0000 | `b49b2f7` | reset: moving to b49b2f72de |
|
||||
| 2025-12-29 09:04:27 +0000 | `b49b2f7` | reset: moving to b49b2f72de |
|
||||
| 2025-12-29 09:03:35 +0000 | `7d7405f` | reset: moving to HEAD |
|
||||
| 2025-12-29 08:40:31 +0000 | `7d7405f` | reset: moving to origin/develop |
|
||||
| 2025-12-29 08:23:15 +0000 | `7d7405f` | pull origin develop: Fast-forward |
|
||||
| 2025-12-29 07:48:15 +0000 | `90eaf53` | checkout: moving from develop to test_ai |
|
||||
| 2025-12-29 07:46:18 +0000 | `b49b2f7` | commit: ai优化 |
|
||||
| 2025-12-29 07:45:20 +0000 | `90eaf53` | checkout: moving from test_ai to develop |
|
||||
| 2025-12-29 07:44:20 +0000 | `90eaf53` | checkout: moving from test_ai to test_ai |
|
||||
| 2025-12-29 07:43:46 +0000 | `90eaf53` | checkout: moving from develop to test_ai |
|
||||
| 2025-12-25 17:14:06 +0000 | `90eaf53` | checkout: moving from develop-backup to develop |
|
||||
| 2025-12-25 17:13:44 +0000 | `90eaf53` | checkout: moving from develop to develop-backup |
|
||||
| 2025-12-25 17:10:28 +0000 | `90eaf53` | reset: moving to 90eaf5395b |
|
||||
| 2025-12-25 16:55:43 +0000 | `54393af` | reset: moving to origin/develop |
|
||||
| 2025-12-25 16:37:03 +0000 | `54393af` | reset: moving to origin/develop |
|
||||
| 2025-12-21 15:01:46 +0000 | `504a471` | commit: 小组周文档补 |
|
||||
| 2025-12-21 14:06:56 +0000 | `cbc73bd` | commit: 李涛周文档补 |
|
||||
| 2025-12-21 13:55:30 +0000 | `5d5b0e8` | pull origin develop (finish): returning to refs/heads/develop |
|
||||
| 2025-12-21 13:55:30 +0000 | `5d5b0e8` | pull origin develop (pick): 沈永佳周文档 |
|
||||
| 2025-12-21 13:55:30 +0000 | `33c7d27` | pull origin develop (start): checkout 33c7d27437f902238712c84d09c1c2fb94f9f419 |
|
||||
| 2025-12-21 13:50:20 +0000 | `ef5314c` | commit: 沈永佳周文档 |
|
||||
| 2025-12-19 08:37:11 +0000 | `f12e23e` | pull origin develop (finish): returning to refs/heads/develop |
|
||||
| 2025-12-19 08:37:11 +0000 | `f12e23e` | pull origin develop (pick): users/me |
|
||||
| 2025-12-19 08:37:11 +0000 | `19cca60` | pull origin develop (start): checkout 19cca60642d7ca9e8ae71081c27066940f2ab5fc |
|
||||
| 2025-12-19 08:37:06 +0000 | `620afee` | commit: users/me |
|
||||
| 2025-12-18 12:23:03 +0000 | `0842169` | commit: ai聊天架构优化 |
|
||||
| 2025-12-18 07:45:08 +0000 | `eb935fa` | commit: 用户-角色映射优化 |
|
||||
| 2025-12-18 07:08:52 +0000 | `2eb858a` | commit: chat前端联调指南 |
|
||||
| 2025-12-18 05:26:53 +0000 | `2bda5cc` | pull origin develop: Fast-forward |
|
||||
| 2025-12-14 15:54:36 +0000 | `bc65fec` | pull origin develop (finish): returning to refs/heads/develop |
|
||||
| 2025-12-14 15:54:36 +0000 | `bc65fec` | pull origin develop (pick): 后端模型对话V1 |
|
||||
| 2025-12-14 15:54:36 +0000 | `b6cb7a5` | pull origin develop (start): checkout b6cb7a58d8fbc92e26f6c69d441bbc6fba0880f7 |
|
||||
| 2025-12-14 15:47:02 +0000 | `4796411` | commit: 后端模型对话V1 |
|
||||
| 2025-12-14 08:02:42 +0000 | `15be5bb` | pull origin develop: Fast-forward |
|
||||
| 2025-12-14 07:31:11 +0000 | `2f6fe59` | pull origin develop: Fast-forward |
|
||||
| 2025-12-12 01:59:32 +0000 | `a7cdecc` | pull origin develop: Fast-forward |
|
||||
| 2025-12-08 11:07:29 +0000 | `1533785` | clone: from https://bdgit.educoder.net/hnu202326010101/ErrorDetecting.git |
|
||||
@ -1,2 +0,0 @@
|
||||
<marquee>阿米诺斯</marquee>
|
||||
<marquee>666</marquee>
|
||||
@ -1,18 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>HTML标签属性学习</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>HTML标签属性学习</h1>
|
||||
<marquee loop="10" bgcolor="green" id="m1">
|
||||
阿米诺斯
|
||||
<input type="password" placeholder="请输入">
|
||||
</marquee>
|
||||
<br><br>
|
||||
<input/>
|
||||
<input disabled>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,15 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>HTML基本结构学习</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>HTML基本结构</h1>
|
||||
<marquee>
|
||||
阿米诺斯
|
||||
<input type="password" placeholder="请输入">
|
||||
<button>提交</button>
|
||||
</marquee>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,22 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>HTML注释学习</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>HTML注释学习</h1>
|
||||
<!-- 这是一个注释 -->
|
||||
<p>这是一个段落</p>
|
||||
<marquee>
|
||||
阿米诺斯
|
||||
<input type="password" placeholder="请输入">
|
||||
</marquee>
|
||||
<input type="text" placeholder="请输入">
|
||||
<!--
|
||||
这是一段注释,
|
||||
用于描述代码的功能或作用。
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
@ -1,12 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>HTML文档声明学习</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>HTML文档声明学习</h1>
|
||||
<p>这是一个段落</p>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,12 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>HTML字符编码学习</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>HTML字符编码学习</h1>
|
||||
<p>这是一个段落</p>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,18 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>HTML设置语言学习</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>HTML设置语言学习</h1>
|
||||
<p>这是一个段落</p>
|
||||
<marquee>
|
||||
我爱你
|
||||
</marquee>
|
||||
<marquee>
|
||||
I love you
|
||||
</marquee>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,11 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>HTML标准结构学习</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -1,24 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>HTML排版标签学习</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>我是一级标题</h1>
|
||||
<h2>我是二级标题</h2>
|
||||
<h3>我是三级标题</h3>
|
||||
<h4>我是四级标题</h4>
|
||||
<h5>我是五级标题</h5>
|
||||
<h6>我是六级标题</h6>
|
||||
<p>我是一个段落</p>
|
||||
<div>
|
||||
我是一个div
|
||||
</div>
|
||||
<div>
|
||||
<p>我是一个段落</p>
|
||||
<p>我是另一个段落</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>HTML图片标签学习</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- img标签是行内元素-->
|
||||
<img width="300px" height="300px" src="微信图片_20250718204812.jpg" alt="微信图片">
|
||||
<!-- 总结: -->
|
||||
<ul>
|
||||
<li>img标签是行内元素</li>
|
||||
<li>img标签有width和height属性</li>
|
||||
<li>img标签有src属性</li>
|
||||
<li>img标签有alt属性</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue