refactor: config/apps 目录重组、文档重构、架构图收窄

- 中央:config/(prometheus,alertmanager,grafana)、apps/(tile-cache,topology-editor)
- 边缘:config/(vmagent,blackbox,targets)、apps/(onvif-exporter)
- env: TRAEFIK_PROVIDER、prometheus/env.example 详细说明
- 文档:README/doc 重构,EDGE_CACHE 合并到 EDGE_AGENT_CONFIG
- targets.csv 更新流程说明,ARCHITECTURE 图收窄

Made-with: Cursor
This commit is contained in:
2026-02-28 22:05:43 -05:00
parent 650e5145f1
commit ab1515dffb
48 changed files with 2071 additions and 509 deletions

View File

@@ -0,0 +1,33 @@
modules:
icmp:
prober: icmp
timeout: 5s
icmp:
preferred_ip_protocol: "ip4"
tcp_connect:
prober: tcp
timeout: 5s
http_2xx:
prober: http
timeout: 5s
http:
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
valid_status_codes: [200]
method: GET
http_post_2xx:
prober: http
timeout: 5s
http:
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
valid_status_codes: [200]
method: POST
headers:
Content-Type: application/json
body: '{}'
tcp_connect_tls:
prober: tcp
timeout: 5s
tcp:
tls: true
tls_config:
insecure_skip_verify: false

View File

@@ -0,0 +1,40 @@
# vmagent 抓取配置(与 prometheus.yml 兼容,自监控端口改为 8429
# 如需修改 region可编辑此文件或通过 deploy.sh 从 vmagent-scrape.yml.template 生成
global:
scrape_interval: 120s
evaluation_interval: 120s
external_labels:
region: workernode_1
scrape_configs:
- job_name: 'onvif-devices'
scrape_interval: 120s
file_sd_configs:
- files: ['/etc/prometheus/target-onvif.json']
refresh_interval: 5m
metrics_path: /metrics
static_configs:
- targets: ['onvif-exporter:9600']
- job_name: 'network-ping'
scrape_interval: 300s
file_sd_configs:
- files: ['/etc/prometheus/target-ping.json']
refresh_interval: 5m
metrics_path: /probe
params:
module: [icmp]
static_configs:
- targets: ['blackbox-exporter:9115']
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
- job_name: 'vmagent-edge'
scrape_interval: 60s
static_configs:
- targets: ['localhost:8429']