AirflowDAGMonitor/config.yaml
Maksim Totmin e99fe6afc3 fix: добавил max_failed_age — игнорировать старые failed runs (>24ч)
- failed runs старше 24 часов пропускаются как историческая ошибка
- предотвращает массовый перезапуск DAG-ов от 2024 года
- параметр max_failed_age настраивается в config.yaml
2026-04-08 18:54:33 +07:00

87 lines
2.9 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# =============================================================================
# Airflow DAG Monitor - Configuration
# =============================================================================
# --------------------------------------------------------------------------
# Секция airflow не обязательна при запуске с флагом --discover.
# В режиме auto-discovery параметры base_url, username, password
# определяются автоматически из Docker-контейнера и .env файла.
# --------------------------------------------------------------------------
airflow:
# Airflow webserver URL
# При --discover определяется автоматически из docker port
base_url: "http://localhost:8080"
# Basic Auth credentials
# При --discover определяются из .env / docker-compose.yml
username: "airflow"
password: "airflow"
# API version: "auto", "v1", or "experimental"
api_version: "v1"
# HTTP request timeout (seconds)
timeout: 30
# Verify SSL certificates
verify_ssl: false
# Delay between API requests to avoid overwhelming Airflow (seconds)
request_delay: 0.1
monitor:
# Interval between monitoring cycles (seconds)
cycle_interval: 300 # 5 minutes
# DAG run duration threshold to consider as "long running" (seconds)
long_running_threshold: 1800 # 30 minutes
# Игнорировать failed runs старше этого порога (seconds)
# Старые ошибки — это история, не текущая проблема
max_failed_age: 86400 # 24 hours
# Time to wait after retry before re-checking (seconds)
retry_wait: 120 # 2 minutes
# Maximum number of retries per DAG run before alerting
max_retries: 1
# Persistent state file path
state_file: "/var/lib/airflow-monitor/state.json"
# Lock file to prevent multiple instances
lock_file: "/var/run/airflow-monitor.lock"
# Purge state entries older than this (seconds)
state_max_age: 86400 # 24 hours
zabbix:
# Enable/disable Zabbix integration (экспорт данных в файлы)
enabled: true
# Каталог для файлов данных, которые читает Zabbix agent
data_dir: "/var/lib/airflow-monitor"
# Имя файла со списком проблемных DAG-ов (JSON)
problems_file: "problems.json"
# Имя файла с heartbeat (epoch timestamp)
heartbeat_file: "heartbeat"
# Имя файла со статусом монитора (JSON)
status_file: "status.json"
logging:
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
# DEBUG рекомендуется на этапе внедрения, затем переключить на INFO
level: "DEBUG"
# Log file path
file: "/var/log/airflow-monitor/monitor.log"
# Maximum log file size before rotation (bytes)
max_bytes: 10485760 # 10 MB
# Number of rotated log files to keep
backup_count: 5