# Prometheus Configuration for Aldudu Academy
# Location: deploy/prometheus.yml

global:
  scrape_interval: 15s
  evaluation_interval: 15s
  external_labels:
    monitor: 'aldudu-academy'

# Alertmanager configuration (optional)
# alerting:
#   alertmanagers:
#     - static_configs:
#         - targets:
#           - alertmanager:9093

# Load rules
# rule_files:
#   - "first_rules.yml"

# Scrape configurations
scrape_configs:
  # Prometheus self-monitoring
  - job_name: 'prometheus'
    static_configs:
      - targets: ['localhost:9090']
        labels:
          instance: 'prometheus'

  # Aldudu Academy Flask App
  - job_name: 'aldudu-academy'
    static_configs:
      - targets: ['host.docker.internal:5000']
        labels:
          instance: 'aldudu-flask'
    metrics_path: '/metrics'
    scheme: 'http'

  # Node Exporter - System Metrics
  - job_name: 'node-exporter'
    static_configs:
      - targets: ['node-exporter:9100']
        labels:
          instance: 'aldudu-server'

  # Redis Exporter (if Redis is running in Docker)
  # - job_name: 'redis'
  #   static_configs:
  #     - targets: ['redis-exporter:9121']
  #       labels:
  #         instance: 'aldudu-redis'

  # MySQL Exporter (if MySQL is running in Docker)
  # - job_name: 'mysql'
  #   static_configs:
  #     - targets: ['mysql-exporter:9104']
  #       labels:
  #         instance: 'aldudu-mysql'
