# Prometheus Configuration for Foxhunt API Gateway # # This configuration scrapes metrics from: # - API Gateway (authentication, proxy, config) # - Trading Service # - Backtesting Service # - ML Training Service global: scrape_interval: 5s evaluation_interval: 5s external_labels: cluster: 'foxhunt-hft' env: 'production' # Alertmanager configuration alerting: alertmanagers: - static_configs: - targets: - 'alertmanager:9093' # Load alert rules rule_files: - 'alerts/api_gateway_alerts.yml' - 'alerts/trading_service_alerts.yml' - 'alerts/ml_training_alerts.yml' - 'alerts/backtesting_alerts.yml' - 'alerts/system_alerts.yml' - 'alerts/ensemble_ml_alerts.yml' # Scrape configurations scrape_configs: # API Gateway metrics - job_name: 'api_gateway' static_configs: - targets: ['api-gateway:9090'] metric_relabel_configs: # Keep only API Gateway metrics - source_labels: [__name__] regex: 'api_gateway_.*' action: keep # Trading Service metrics - job_name: 'trading_service' static_configs: - targets: ['trading-service:9091'] metric_relabel_configs: - source_labels: [__name__] regex: 'trading_.*' action: keep # Backtesting Service metrics - job_name: 'backtesting_service' static_configs: - targets: ['backtesting-service:9092'] metric_relabel_configs: - source_labels: [__name__] regex: 'backtesting_.*' action: keep # ML Training Service metrics - job_name: 'ml_training_service' static_configs: - targets: ['ml-training-service:9093'] metric_relabel_configs: - source_labels: [__name__] regex: 'ml_training_.*' action: keep # PostgreSQL exporter (for NOTIFY/config events) - job_name: 'postgresql' static_configs: - targets: ['postgres-exporter:9187'] # Redis exporter (for JWT revocation) - job_name: 'redis' static_configs: - targets: ['redis-exporter:9121'] # Node exporter (system metrics) - job_name: 'node' static_configs: - targets: - 'api-gateway-node:9100' - 'trading-service-node:9100' - 'backtesting-service-node:9100' - 'ml-training-service-node:9100'