refactor: 边缘节点与配置精简
- 边缘: Prometheus 改为 vmagent,统一 docker-compose.yml,内存+磁盘缓存 - 边缘脚本: 合并为 deploy.sh [--local],删除 run-edge-local、quick-setup、run-edge-with-cache - 配置: 合并为 update-configs.sh,统一 targets.csv,生成 target-onvif/target-ping/target-topology - 删除 topology-editor、旧格式 devices.csv/ping-targets.csv、setup-remote-write、test-connection - 文档: 更新 EDGE_CACHE、TIANDITU(瓦片改 4090 直连 tile-cache) Made-with: Cursor
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
不解析 ONVIF,只监控“摄像头/NVR 是否在线、端口是否可达”。
|
||||
|
||||
- **已有组件**:边缘节点已包含 **Blackbox Exporter**(如 `prom/blackbox-exporter`)。
|
||||
- **做法**:在 `config/ping-targets.json`(或等价目标列表)中加入摄像头/NVR 的 IP,用 ICMP 或 TCP/HTTP 探测(例如对 80/8000 等端口做 `tcp_connect` 或 `http_2xx`)。
|
||||
- **做法**:在 `config/target-ping.json`(或等价目标列表)中加入摄像头/NVR 的 IP,用 ICMP 或 TCP/HTTP 探测(例如对 80/8000 等端口做 `tcp_connect` 或 `http_2xx`)。
|
||||
- **优点**:无需任何 ONVIF 镜像,部署即可用,与现有 Ping 监控一致。
|
||||
- **缺点**:无设备级 ONVIF 状态、无摄像头特有指标。
|
||||
|
||||
@@ -65,9 +65,9 @@
|
||||
|
||||
**本项目已在 edge-agent/onvif-exporter/ 提供自建容器**,无需再找第三方镜像。
|
||||
|
||||
- **实现**:Go + [use-go/onvif](https://github.com/use-go/onvif),读取 `config/onvif-targets.json`(与 `targets.csv` 中 onvif 行一致),轮询 ONVIF `GetDeviceInformation`,暴露 Prometheus 指标 `onvif_device_up`、`onvif_probe_duration_seconds`。
|
||||
- **实现**:Go + [use-go/onvif](https://github.com/use-go/onvif),读取 `config/target-onvif.json`(与 `targets.csv` 中 onvif 行一致),轮询 ONVIF `GetDeviceInformation`,暴露 Prometheus 指标 `onvif_device_up`、`onvif_probe_duration_seconds`。
|
||||
- **启用**:在边缘节点执行 `docker compose --profile onvif up -d --build`,会构建并启动 ONVIF exporter,无需设置 `ONVIF_EXPORTER_IMAGE`。
|
||||
- **配置**:在 `config/targets.csv` 中增加 onvif 行(ip、device_type、model、location、username、password、onvif_port),运行 `config/update-configs.sh` 生成 `onvif-targets.json`。
|
||||
- **配置**:在 `config/targets.csv` 中增加 onvif 行(ip、device_type、model、location、username、password、onvif_port),运行 `config/update-configs.sh` 生成 `target-onvif.json`。
|
||||
- 若需自行修改或扩展,见 **edge-agent/onvif-exporter/README.md**。
|
||||
|
||||
---
|
||||
@@ -78,4 +78,4 @@
|
||||
- **若需要 ONVIF**:使用本项目自建的 **edge-agent/onvif-exporter**,执行 `docker compose --profile onvif up -d --build` 即可构建并启动;无需再设 `ONVIF_EXPORTER_IMAGE`。
|
||||
- **摄像头支持 SNMP 时**:优先考虑 **SNMP Exporter** 作为“Prometheus 监控摄像头”的替代方案,再根据需要补充 Frigate 或 Blackbox。
|
||||
|
||||
具体边缘配置与 compose 变更见 **[EDGE_AGENT_CONFIG.md](EDGE_AGENT_CONFIG.md)** 及 `edge-agent/docker-compose.yml`。
|
||||
具体边缘配置与 compose 变更见 **[EDGE_AGENT_CONFIG.md](EDGE_AGENT_CONFIG.md)** 及 `edge-agent/docker-compose.yaml`。
|
||||
|
||||
Reference in New Issue
Block a user