修复业务侧日志采集失败问题
Some checks failed
itom-platform auto build image / build (push) Has been cancelled

This commit is contained in:
kim
2026-01-21 12:08:32 +08:00
parent e018f742ad
commit ea386977ba
5 changed files with 677 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
# ==============================
# chat-deploy 可观测性配置
# ==============================
# 项目标识(必须与 itom-platform 中配置一致)
OBS_PROJECT=chat-deploy
OBS_SERVICE=chat-deploy
OBS_SERVICE_NAME=chat-deploy
OBS_ENV=prod
# ==============================
# 中心侧连接配置(必须修改)
# ==============================
# itom-platform 可观测中心的地址
OBS_HOST=CHANGE_ME
OBS_SCHEME=http
# 鉴权 token必须与 itom-platform 中心侧一致)
OBS_AUTH_TOKEN=CHANGE_ME
# ==============================
# 日志采集配置Promtail
# ==============================
# Loki 写入 URL走网关
LOKI_URL=${OBS_SCHEME}://${OBS_HOST}/loki/api/v1/push
# Promtail 镜像版本
PROMTAIL_IMAGE=grafana/promtail:3.0.0
# Docker API 版本(避免与旧 Docker daemon 协议不兼容)
DOCKER_API_VERSION=1.44
# ==============================
# 指标采集配置Prometheus Agent
# ==============================
# 中心侧 remote_write receiver 地址
METRICS_REMOTE_WRITE_URL=${OBS_SCHEME}://${OBS_HOST}/api/v1/write
# 中心侧是否开启 remote_write 鉴权
OBS_AUTH_ENABLE=false
# 业务服务指标采集目标可选格式name=host:port,name2=host:port
METRICS_TARGETS=
# ==============================
# MongoDB 配置(必须修改)
# ==============================
# MongoDB 连接 URI用于 mongodb-exporter
# 格式mongodb://username:password@host:port/database?authSource=admin
MONGODB_URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?authSource=openim_v3
# MongoDB Exporter 采集目标(自动配置,通常无需修改)
MONGODB_EXPORTER_TARGETS=mongodb-exporter:9216
MONGODB_EXPORTER_SERVICE=chat-deploy
# ==============================
# Redis 配置(可选)
# ==============================
# Redis 地址(用于 redis-exporter
REDIS_ADDR=localhost:6379
REDIS_PASSWORD=
# Redis Exporter 采集目标
REDIS_EXPORTER_TARGETS=redis-exporter:9121
REDIS_EXPORTER_SERVICE=chat-deploy
# ==============================
# Node Exporter 配置(可选)
# ==============================
NODE_EXPORTER_TARGETS=node-exporter:9100
NODE_EXPORTER_SERVICE=chat-deploy