Files
tokens-reef/deploy/monitoring/prometheus/prometheus-multi-node.yml
Developer 349d783fd1 refactor: clean up project structure
- Remove old review reports (keep latest only)
- Move docs/ to deploy/docs-backup/
- Move performance-testing/ to deploy/
- Clean up test output files
- Organize root directory
2026-04-06 23:36:03 +08:00

56 lines
1.3 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Sub2API 多机节点 Prometheus 配置
# 本地保留3天同时 remote_write 到中心存储
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
cluster: '${CLUSTER_NAME:-sub2api}'
replica: '${INSTANCE_NAME:-node-1}'
region: '${REGION:-default}'
# 本地只保留3天数据
storage:
tsdb:
retention.time: 3d
retention.size: 500MB
wal-compression: true
# 发送到中心存储
remote_write:
- url: '${VM_INSERT_URL:-http://localhost:8480}/insert/0/prometheus/api/v1/write'
queue_config:
capacity: 10000
max_samples_per_send: 2000
batch_send_deadline: 5s
min_shards: 1
max_shards: 2
min_backoff: 30ms
max_backoff: 5s
metadata_config:
send: true
max_samples_per_send: 2000
rule_files:
- 'rules/sub2api-alerts-light.yml'
scrape_configs:
- job_name: 'sub2api-app'
static_configs:
- targets: ['localhost:8080']
labels:
service: 'sub2api'
tier: 'backend'
metrics_path: '/metrics'
scrape_interval: 15s
- job_name: 'node-exporter'
static_configs:
- targets: ['localhost:9100']
scrape_interval: 15s
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
scrape_interval: 15s