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:
33
edge-agent/config/blackbox/config.yml
Normal file
33
edge-agent/config/blackbox/config.yml
Normal 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
|
||||
40
edge-agent/config/vmagent/vmagent-scrape.yml.template
Normal file
40
edge-agent/config/vmagent/vmagent-scrape.yml.template
Normal 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']
|
||||
Reference in New Issue
Block a user