# monitoring/prometheus.yml
global:
  scrape_interval: 15s
  evaluation_interval: 15s

scrape_configs:
  - job_name: 'telegram-bot'
    static_configs:
      - targets: ['backend:8000']
        labels:
          service: 'telegram-bot-backend'
    
  - job_name: 'mysql'
    static_configs:
      - targets: ['mysql:9104']
        labels:
          service: 'mysql-database'
    
  - job_name: 'redis'
    static_configs:
      - targets: ['redis:9121']
        labels:
          service: 'redis-cache'
    
  - job_name: 'node-exporter'
    static_configs:
      - targets: ['backend:9100', 'mysql:9100', 'redis:9100']
        labels:
          service: 'node-metrics'

alerting:
  alertmanagers:
    - static_configs:
        - targets: ['alertmanager:9093']

rule_files:
  - "alerts.yml"