scale600/project-techcloudup
GitHub: scale600/project-techcloudup
多云生产基础设施健康监控仪表板,通过 FastAPI 定时探测 AWS/GCP/Azure 上的服务端点并实时展示状态。
Stars: 1 | Forks: 0
# project.techcloudup.com
多云生产基础设施仪表板 — 针对 AWS、GCP 和 Azure 上的服务进行实时健康监控。
## 架构
```
Cloud Scheduler (every 5 min)
│
▼
┌───────────────────────────┐
│ Cloud Run (FastAPI) │
│ health-checker │
│ ┌──────────┬──────────┐ │
│ │ /check-all│ /api/status│
│ │ (write) │ (read) │
│ └─────┬─────┴────┬─────┘│
└─────────┼──────────┼──────┘
│ │
▼ ▼
┌──────────┐ ┌──────────────┐
│ Firestore│ │ firebase.json │
│ (health- │ │ Hosting proxy │
│ checks) │ │ /api/** → CR │
└──────────┘ └──────────────┘
```
元仪表板本身是一个健康检查器,用于探测实时项目 endpoint 并实时展示其状态。
## 技术栈
### 元仪表板(本仓库)
| 层级 | 技术 |
|---|---|
| **Runtime** | Python 3.12, FastAPI, Uvicorn |
| **HTTP Client** | httpx (async, HTTP/2) |
| **Database** | Firestore (GCP) |
| **Scheduling** | Cloud Scheduler → `/check-all`(每 5 分钟) |
| **Hosting** | Cloud Run (serverless) + Firebase Hosting (CDN proxy) |
| **Container** | Docker, Artifact Registry |
| **IaC** | Terraform (Cloud Run v2, Artifact Registry, IAM) |
| **CI/CD** | 手动 `gcloud run deploy` / Docker push |
### 受监控的服务
| 领域 | 技术栈 |
|---|---|
| **Cloud Admin** | AWS IAM, EC2, S3, CloudTrail, CloudWatch |
| **Kubernetes** | GCP GKE, Cloud Armor, Grafana, Velero |
| **DBA/BI** | Azure SQL, Function App, Key Vault, Power BI |
| **AI Agents** | Vertex AI (Gemini 2.5 Flash), Google ADK 2.2, Streamlit |
| **WAF** | Cloudflare (custom rules + url_decode), Nginx, Flask |
| **IDS** | Suricata (eve.json), n8n automation, Flask |
| **Phishing** | Flask SSE, investigate.sh (DNS/WHOIS/SSL/HTTP) |
| **IoT** | AWS IoT Core (MQTT/mTLS, Device Shadow, OTA, Lambda, DynamoDB) |
| **Edge AI** | Transformers.js, DETR ONNX, WebGPU/WASM, Groq API |
| **ERP/CRM** | ERPNext (Frappe), EspoCRM, MariaDB, Redis |
| **Mail/Social** | Listmonk (PostgreSQL 17), Mixpost (Traefik, MySQL, Redis) |
| **PRM** | Monica (Docker, Caddy) |
| **Mobile** | Flutter, Firebase (Firestore, Auth), Riverpod |
| **Blog** | WordPress (AI auto-publishing), Nginx, PHP-FPM |
## 项目结构
```
health-checker/
├── main.py # FastAPI app (health probe + API + static serve)
├── projects.json # Monitored endpoint definitions with categories
├── Dockerfile # Python 3.12-slim + uvicorn
├── requirements.txt # fastapi, uvicorn, httpx, firebase-admin
└── static/
└── index.html # Dashboard UI (dark/light theme, category filter)
dashboard/
└── firebase.json # Firebase Hosting → Cloud Run proxy
terraform/
├── main.tf # Cloud Run v2 service, Artifact Registry binding
├── variables.tf
└── outputs.tf
```
## 部署
```
cd health-checker
# Build & push
docker build --platform linux/amd64 -t /health-checker:latest .
docker push /health-checker:latest
# Deploy
gcloud run deploy health-checker \
--region=us-central1 \
--image=/health-checker:latest \
--project=
```
健康检查器会在容器启动时读取 `projects.json` — 在添加或更新受监控的 endpoint 时,无需更改环境变量。
## API
| Endpoint | 触发器 | 描述 |
|---|---|---|
| `GET /check-all` | Cloud Scheduler | 探测所有 endpoint,并写入 Firestore |
| `GET /api/status` | Dashboard UI | 从 Firestore 读取最新状态,并按 `order` 排序 |
| `GET /` | Browser | 静态仪表板 (HTML/JS),每 60 秒自动刷新 |
标签:AV绕过, ECS, FastAPI, GCP, Terraform, 健康检查, 后端开发, 多云管理, 请求拦截, 运维监控, 运行时操纵