Files
Distributed-Prometheus/doc/CENTRAL_SERVER_CONFIG.md
Super User 72a5bf30b4 feat: 天地图瓦片缓存(tile-cache)、拓扑标注助手与文档更新
- tile-cache: 瓦片缓存服务(vec/cva)、启动探针、详细日志、上游超时可配置(UPSTREAM_TIMEOUT_MS)
- central: docker-compose 集成 tile-cache,env.example 增加 TILE_CACHE_* / TIANDITU_TK
- topology-editor: 天地图/缓存加载、GPS 安全来源错误提示、TIANDITU 文档(403/白名单、localhost 测试说明)
- doc: README 部署步骤与 GPS 安全来源说明,TIANDITU_CONFIG 完善

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-25 11:11:38 -05:00

44 lines
2.3 KiB
Markdown
Raw 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.
# 中央服务器配置文件说明
## 目录结构
```
central-server/
├── docker-compose.yml # 服务编排
├── deploy.sh # 部署脚本
├── prometheus.yml # Prometheus 主配置
├── alert_rules.yml # 告警规则
├── alertmanager/alertmanager.yml
└── grafana/
├── setup-users.sh
├── provisioning/datasources/ # prometheus.yml, victoriametrics.yml
└── dashboards/
```
## 主要服务与端口
| 服务 | 端口 | 说明 |
|------|------|------|
| prometheus-central | 9091 | 自抓 + 告警评估;边缘数据由 Grafana 从 VictoriaMetrics 查询 |
| grafana | 3000 | 数据源Prometheus中央自抓、VictoriaMetrics边缘数据 |
| victoria-metrics | 8428 | 接收边缘 remote_write |
| alertmanager | 9093 | 告警路由与通知 |
## 关键配置摘要
- **prometheus.yml**`remote_write` 指向 VictoriaMetrics`rule_files: alert_rules.yml`抓取自身、VM、Alertmanager、Grafana。
- **告警规则与通知**:见 [ALERTING.md](ALERTING.md)。
- **Grafana 数据源**Provisioning 下配置 Prometheus、VictoriaMetrics查边缘指标请选 **VictoriaMetrics**
- **Grafana Geomap 使用天地图缓存**:在 Geomap 面板中将 Base layer 选为 **XYZ Tile layer**,底图 URL 填 `http://<central>:4080/tiles/vec/{z}/{x}/{y}`,再添加一层 XYZ 填 `http://<central>:4080/tiles/cva/{z}/{x}/{y}`中文注记。key 仅需在 central 配置 `TIANDITU_TK`,无需在 Grafana 中填写。详见 [TIANDITU_CONFIG.md](TIANDITU_CONFIG.md)。
- **多用户**`grafana/setup-users.sh`,见 [USER_MANAGEMENT.md](USER_MANAGEMENT.md)。
## 修改与重载
- Prometheus`prometheus.yml``alert_rules.yml``docker compose restart prometheus-central`,或 `curl -X POST http://localhost:9091/-/reload`(若启用 lifecycle
- Alertmanager`alertmanager/alertmanager.yml``docker compose restart alertmanager`
- Grafana改 provisioning 后重启;或通过 Web UI 修改(持久化到库)。
## 相关文档
- [ARCHITECTURE.md](ARCHITECTURE.md) | [ALERTING.md](ALERTING.md) | [USER_MANAGEMENT.md](USER_MANAGEMENT.md) | [central-server/CONFIGURATION.md](../central-server/CONFIGURATION.md)