BUH_bot/monitoring/prometheus.yml
Игорь Надеин 4800e8c375 feat: Add production Docker orchestration with monitoring
Production Stack (7 services):
- buh_bot: Main bot from registry (1 CPU, 1GB RAM)
- nginx: Reverse proxy with rate limiting (10 req/s)
- prometheus: Metrics collection (30d retention)
- grafana: Monitoring dashboards (port 3000)
- node_exporter: Host metrics (port 9100)
- cadvisor: Container metrics (port 8080)
- watchtower: Auto-updates (hourly check)

Configuration:
- docker-compose.prod.yml with 7-service stack
- nginx.conf with SSL-ready config and healthchecks
- prometheus.yml with scrape configs
- grafana datasource and dashboard provisioning
- .env.prod.example template
- Custom network 172.20.0.0/16
- Persistent volumes in /var/lib/buh_bot
- Log rotation: 50MB x 5 files
2025-11-03 14:20:48 +03:00

48 lines
1.1 KiB
YAML

# Prometheus configuration for BUH Bot monitoring
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
cluster: 'buh_bot_production'
environment: 'production'
# Alerting configuration
alerting:
alertmanagers:
- static_configs:
- targets: []
# Scrape configurations
scrape_configs:
# Prometheus self-monitoring
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
# Node Exporter (host metrics)
- job_name: 'node_exporter'
static_configs:
- targets: ['node_exporter:9100']
labels:
instance: 'host'
# cAdvisor (container metrics)
- job_name: 'cadvisor'
static_configs:
- targets: ['cadvisor:8080']
labels:
instance: 'containers'
# Docker daemon metrics (если включено)
# - job_name: 'docker'
# static_configs:
# - targets: ['host.docker.internal:9323']
# BUH Bot metrics (если бот экспортирует метрики)
# - job_name: 'buh_bot'
# static_configs:
# - targets: ['buh_bot:8000']
# labels:
# service: 'telegram_bot'