# HAProxy Manager External Monitoring Configuration # Copy this file to /etc/haproxy-monitor.conf and modify for your environment # Container configuration CONTAINER_NAME="haproxy-manager" CONTAINER_API_URL="http://localhost:8000" # Log directory (adjust based on your Docker volume setup) # Common paths: # - Docker volumes: /var/lib/docker/volumes/haproxy-logs/_data # - Bind mounts: /path/to/your/logs # - Docker Desktop (Mac/Windows): May need different path LOG_DIR="/var/lib/docker/volumes/haproxy-logs/_data" # API key for certificate status checks API_KEY="your-secure-api-key-here" # Alerting configuration ALERT_EMAIL="admin@yourdomain.com" WEBHOOK_URL="https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK" # Example crontab entries for external monitoring: # # Check container and API health every 5 minutes # */5 * * * * /path/to/monitor-errors-external.sh health # # Check for errors every 30 minutes # */30 * * * * /path/to/monitor-errors-external.sh errors 30 # # Check certificates daily at 9 AM # 0 9 * * * /path/to/monitor-errors-external.sh certs 30 # # Comprehensive check every hour # 0 * * * * /path/to/monitor-errors-external.sh all 60 30 # Installation instructions: # 1. Copy this file to /etc/haproxy-monitor.conf # 2. Modify the variables above for your environment # 3. Copy monitor-errors-external.sh to /usr/local/bin/ # 4. Make it executable: chmod +x /usr/local/bin/monitor-errors-external.sh # 5. Install required packages: apt-get install curl jq # 6. Set up crontab entries as shown above