Files
root c4825c2d27 feat: 引入 vmauth 鉴权与严格多租户
- 对外端口统一为 18428(vmauth 入口),VM 不再直接暴露宿主机端口
- 边缘 vmagent 与中央 Prometheus remote_write 增加 basic auth
- 支持 tenants.csv 驱动的 per-tenant 写入/查询隔离,并提供管理员跨租户只读查询
- 更新 Grafana provisioning 与部署/文档

Made-with: Cursor
2026-04-22 11:41:13 +00:00

35 lines
1.4 KiB
Plaintext
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.
# 中央Prometheus服务器地址 (支持IP或域名)
# 本机同机部署时使用: host.docker.internal容器访问宿主机
CENTRAL_SERVER_HOST=192.168.1.10
# 或者使用域名: CENTRAL_SERVER_HOST=prometheus.company.com
# 本机同机: CENTRAL_SERVER_HOST=host.docker.internal
# 中央服务器端口
CENTRAL_SERVER_PORT=18428
# 常用端口说明:
# 18428 - VictoriaMetrics (推荐)
# 9090 - Prometheus
# 8080 - 自定义端口
# 边缘节点标识
EDGE_NODE_ID=workernode_1
# vmauth 写入账号(需与中央 central-server/.env 保持一致)
VMAUTH_WRITE_USER=vm_write
VMAUTH_WRITE_PASSWORD=change-me-strong-write
# 远程写入配置
# 边缘节点会将数据推送到中央服务器的VictoriaMetrics
# 格式: http://域名或IP:端口/api/v1/write
# 默认端口: 18428 (VictoriaMetrics)
# 边缘缓存docker-compose 使用 vmagent含内存+磁盘缓存,详见 doc/EDGE_AGENT_CONFIG.md
# 注意ONVIF 设备在 config/targets.csv 中配置(每行 ip、username、password 等)
# 配置与自建应用结构config/vmagent、blackbox、targets; apps/onvif-exporter
# ONVIF Exporter 镜像(仅在使用 --profile onvif 时需要)
# 公共 registry 无现成镜像,需自建或使用第三方镜像,参见 doc/ONVIF_ALTERNATIVES.md
# ONVIF_EXPORTER_IMAGE=localhost/onvif-exporter:local