Skip to content

Commit 8dcdc67

Browse files
author
谭策
committed
0
1 parent 881d52a commit 8dcdc67

3 files changed

Lines changed: 77 additions & 7 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,6 @@ docker-compose.override.yml
5555

5656
# OS
5757
Thumbs.db
58+
59+
# Publishing / Marketing (keep local, not in repo)
60+
docs/WECHAT_ARTICLE.md

SPEC.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
| 项目名称 | ITOps Agent Platform |
88
| 项目类型 | 企业级全栈 Web 应用 |
99
| 核心功能 | 可视化工作流编排多个 AI Agent,实现运维自动化 |
10-
| 版本 | v3.0.1 |
11-
| 路由模块 | 25 个 |
10+
| 版本 | v3.0.3 |
11+
| API 路由模块 | 29 个(+ /health = 30) |
1212
| 业务服务 | 18 个 |
13-
| 前端页面 | 22|
14-
| 数据库表 | 27|
13+
| 前端页面 | 28|
14+
| 数据库表 | 39|
1515

1616
## 技术栈
1717

@@ -73,7 +73,7 @@
7373

7474
- **SSH 连接**: 密码或密钥认证,加密存储
7575
- **命令执行**: 在线 Shell,命令历史审计
76-
- **合规检查**: 13 项系统检查(CPU、内存、磁盘、网络、用户、服务、运行时间、OS、SSH 配置、防火墙、登录记录、定时任务、可更新包)
76+
- **合规检查**: 14 项系统检查(CPU、内存、磁盘、网络、用户、服务、运行时间、OS、SSH 配置、防火墙、登录记录、定时任务、可更新包、SELinux
7777
- **数据导出**: 命令历史和合规历史 JSON 导出
7878

7979
### 4. 告警系统
@@ -145,6 +145,10 @@
145145
| `/api/alert-noise` | 告警降噪 ||
146146
| `/api/root-cause-analysis` | 根因分析 ||
147147
| `/api/multi-agent` | 多 Agent 协作 ||
148+
| `/api/remediation-policies` | 自动修复策略 ||
149+
| `/api/remediation-executions` | 修复执行记录 ||
150+
| `/api/backups` | 数据库备份/恢复 ||
151+
| `/api/database` | 数据库管理 ||
148152
| `/health` | 健康检查 ||
149153

150154
## WebSocket 事件
@@ -204,7 +208,7 @@
204208
## 安全规范
205209

206210
- 服务器密码和 SSH 密钥使用 AES-256-GCM 加密存储
207-
- 用户密码使用 bcrypt (salt rounds = 10) 哈希
211+
- 用户密码使用 bcrypt (salt rounds = 12) 哈希
208212
- JWT 认证,Token 过期和黑名单机制
209213
- API 速率限制(15 分钟内最多 100 次请求)
210214
- 敏感信息日志自动脱敏

docs/API.md

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Content-Type: application/json
1717
1818
{
1919
"username": "admin",
20-
"password": "admin123"
20+
"password": "admin"
2121
}
2222
```
2323

@@ -736,6 +736,68 @@ GET /api/multi-agent/:id
736736
Authorization: Bearer <token>
737737
```
738738

739+
## 自动修复(Auto Remediation)
740+
741+
### 获取修复策略列表
742+
```http
743+
GET /api/remediation-policies
744+
Authorization: Bearer <token>
745+
```
746+
747+
### 创建修复策略
748+
```http
749+
POST /api/remediation-policies
750+
Authorization: Bearer <token>
751+
Content-Type: application/json
752+
753+
{
754+
"name": "CPU 过高自动重启",
755+
"alertRule": "cpu_usage > 90",
756+
"action": "restart_service",
757+
"enabled": true
758+
}
759+
```
760+
761+
### 获取修复执行记录
762+
```http
763+
GET /api/remediation-executions
764+
Authorization: Bearer <token>
765+
```
766+
767+
## 备份与恢复
768+
769+
### 创建数据库备份
770+
```http
771+
POST /api/backups
772+
Authorization: Bearer <token>
773+
```
774+
775+
### 获取备份列表
776+
```http
777+
GET /api/backups
778+
Authorization: Bearer <token>
779+
```
780+
781+
### 恢复备份
782+
```http
783+
POST /api/backups/:id/restore
784+
Authorization: Bearer <token>
785+
```
786+
787+
## 数据库管理
788+
789+
### 获取数据库信息
790+
```http
791+
GET /api/database/info
792+
Authorization: Bearer <token>
793+
```
794+
795+
### 数据库健康检查
796+
```http
797+
GET /api/database/health
798+
Authorization: Bearer <token>
799+
```
800+
739801
## 健康检查
740802

741803
```http
@@ -768,6 +830,7 @@ GET /health
768830
- `alert:new`
769831
- `alert:updated`
770832
- `notification:new`
833+
- `remediation:executed` - 修复执行通知
771834

772835
## 错误响应
773836

0 commit comments

Comments
 (0)