Some checks failed
CD Pipeline / build-and-deploy (push) Failing after 1m38s
tests/test_auto_repair_service.py: - 更新 3個測試符合 2026-04-07 統帥指令移除門檻 - APPROVED Playbook 直接通過 (低相似度/低品質/高風險均通過) tests/test_phase22_nemotron_collab.py: - 更新 log key: nemotron_collaboration_failed → exhausted ops/monitoring/docker-compose.exporters.yaml: - 修正 postgres DSN: awoooi:awoooi_prod_2026@localhost:5432/awoooi_prod Sprint 5.2 新增腳本: - scripts/sprint51_e2e_validation.py: L7 E2E 驗收腳本 (T1-T5) - scripts/ops/deploy-docker-health-monitor.sh: Plan A 一鍵部署腳本 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
70 lines
2.6 KiB
YAML
70 lines
2.6 KiB
YAML
# =============================================================================
|
|
# AWOOOI Database Exporters
|
|
# =============================================================================
|
|
# 負責人: DevOps Commander
|
|
# 版本: v1.0
|
|
# 日期: 2026-03-29
|
|
# ADR: ADR-037 Phase B (Database Exporters)
|
|
#
|
|
# 部署位置: 192.168.0.188
|
|
# 部署指令: docker compose -f docker-compose.exporters.yaml up -d
|
|
# =============================================================================
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
# ==========================================================================
|
|
# PostgreSQL Exporter
|
|
# 端口: 9187
|
|
# 文檔: https://github.com/prometheus-community/postgres_exporter
|
|
# ==========================================================================
|
|
postgres-exporter:
|
|
image: prometheuscommunity/postgres-exporter:v0.15.0
|
|
container_name: postgres-exporter
|
|
restart: unless-stopped
|
|
ports:
|
|
- "9187:9187"
|
|
environment:
|
|
# 連線字串 (使用環境變數注入密碼)
|
|
# 2026-04-08 Claude Sonnet 4.6: 修正用戶名/資料庫名 (awoooi user, awoooi_prod db)
|
|
DATA_SOURCE_NAME: "postgresql://awoooi:${POSTGRES_PASSWORD:-awoooi_prod_2026}@localhost:5432/awoooi_prod?sslmode=disable"
|
|
# 自訂查詢配置
|
|
PG_EXPORTER_EXTEND_QUERY_PATH: "/etc/postgres_exporter/queries.yaml"
|
|
# 日誌等級
|
|
PG_EXPORTER_LOG_LEVEL: "info"
|
|
volumes:
|
|
- ./postgres-exporter-queries.yaml:/etc/postgres_exporter/queries.yaml:ro
|
|
# 直接使用 host network 連接本地 PostgreSQL
|
|
network_mode: host
|
|
labels:
|
|
- "prometheus.scrape=true"
|
|
- "prometheus.port=9187"
|
|
- "awoooi.service=monitoring"
|
|
- "awoooi.component=postgres-exporter"
|
|
|
|
# ==========================================================================
|
|
# Redis Exporter
|
|
# 端口: 9121
|
|
# 文檔: https://github.com/oliver006/redis_exporter
|
|
# ==========================================================================
|
|
redis-exporter:
|
|
image: oliver006/redis_exporter:v1.58.0
|
|
container_name: redis-exporter
|
|
restart: unless-stopped
|
|
ports:
|
|
- "9121:9121"
|
|
environment:
|
|
# Redis 連線 (192.168.0.188:6380 是 AWOOOI Redis)
|
|
REDIS_ADDR: "redis://localhost:6380"
|
|
REDIS_PASSWORD: "${REDIS_PASSWORD:-}"
|
|
# 啟用額外指標
|
|
REDIS_EXPORTER_CHECK_KEYS: "awoooi:*"
|
|
REDIS_EXPORTER_INCL_SYSTEM_METRICS: "true"
|
|
# 直接使用 host network 連接本地 Redis
|
|
network_mode: host
|
|
labels:
|
|
- "prometheus.scrape=true"
|
|
- "prometheus.port=9121"
|
|
- "awoooi.service=monitoring"
|
|
- "awoooi.component=redis-exporter"
|