🐛 Backend Optimization: Removed error monitoring configuration files and utilities, refactored logging configuration for improved performance. 🎉
This commit is contained in:
@@ -1,106 +0,0 @@
|
||||
# Mercedes-Benz MYP Platform - Error Monitoring Configuration
|
||||
# ==========================================================
|
||||
#
|
||||
# Diese Datei enthält alle Umgebungsvariablen für das automatische
|
||||
# Error-Monitoring-System mit E-Mail-Benachrichtigungen.
|
||||
#
|
||||
# Kopieren Sie diese Datei zu 'error_monitoring.env' und passen Sie
|
||||
# die Werte an Ihre Umgebung an.
|
||||
|
||||
# ===== E-MAIL-KONFIGURATION =====
|
||||
|
||||
# SMTP-Server-Einstellungen
|
||||
SMTP_HOST=smtp.gmail.com
|
||||
SMTP_PORT=587
|
||||
SMTP_USE_TLS=true
|
||||
|
||||
# SMTP-Anmeldedaten (für Gmail: App-Passwort verwenden!)
|
||||
SMTP_USERNAME=myp-system@mercedes-benz.com
|
||||
SMTP_PASSWORD=your-app-password-here
|
||||
|
||||
# E-Mail-Adressen
|
||||
ALERT_EMAIL=admin@mercedes-benz.com
|
||||
FROM_EMAIL=myp-system@mercedes-benz.com
|
||||
FROM_NAME=MYP Platform Error Monitor
|
||||
|
||||
# ===== MONITORING-KONFIGURATION =====
|
||||
|
||||
# Report-Intervall in Sekunden (Standard: 3600 = 1 Stunde)
|
||||
ERROR_REPORT_INTERVAL=3600
|
||||
|
||||
# Minimale Anzahl neuer Fehler für E-Mail-Versand
|
||||
MIN_ERRORS_FOR_EMAIL=1
|
||||
|
||||
# Maximale Anzahl Fehler pro Report (verhindert zu lange E-Mails)
|
||||
MAX_ERRORS_PER_REPORT=50
|
||||
|
||||
# ===== ERWEITERTE EINSTELLUNGEN =====
|
||||
|
||||
# Speicherort der Error-Monitor-Datenbank (relativ zu app-Verzeichnis)
|
||||
ERROR_DB_PATH=database/error_monitor.db
|
||||
|
||||
# Log-Level für Error-Monitor selbst (WARNING, ERROR, CRITICAL)
|
||||
ERROR_MONITOR_LOG_LEVEL=WARNING
|
||||
|
||||
# ===== BEISPIEL-KONFIGURATIONEN =====
|
||||
|
||||
# Für Development (alle 5 Minuten, ab 1 Fehler)
|
||||
# ERROR_REPORT_INTERVAL=300
|
||||
# MIN_ERRORS_FOR_EMAIL=1
|
||||
|
||||
# Für Production (alle 2 Stunden, ab 3 Fehlern)
|
||||
# ERROR_REPORT_INTERVAL=7200
|
||||
# MIN_ERRORS_FOR_EMAIL=3
|
||||
|
||||
# Für Testing (sofortige Reports)
|
||||
# ERROR_REPORT_INTERVAL=60
|
||||
# MIN_ERRORS_FOR_EMAIL=1
|
||||
|
||||
# ===== SMTP-PROVIDER-BEISPIELE =====
|
||||
|
||||
# Gmail (App-Passwort erforderlich)
|
||||
# SMTP_HOST=smtp.gmail.com
|
||||
# SMTP_PORT=587
|
||||
# SMTP_USE_TLS=true
|
||||
|
||||
# Outlook/Hotmail
|
||||
# SMTP_HOST=smtp-mail.outlook.com
|
||||
# SMTP_PORT=587
|
||||
# SMTP_USE_TLS=true
|
||||
|
||||
# Yahoo
|
||||
# SMTP_HOST=smtp.mail.yahoo.com
|
||||
# SMTP_PORT=587
|
||||
# SMTP_USE_TLS=true
|
||||
|
||||
# Mercedes-Benz Corporate (Beispiel)
|
||||
# SMTP_HOST=mail.mercedes-benz.com
|
||||
# SMTP_PORT=587
|
||||
# SMTP_USE_TLS=true
|
||||
|
||||
# ===== SICHERHEITSHINWEISE =====
|
||||
|
||||
# 1. Verwenden Sie App-Passwörter anstatt normale Passwörter
|
||||
# 2. Diese Datei sollte NIEMALS in Git committed werden
|
||||
# 3. Setzen Sie restriktive Dateiberechtigungen (600)
|
||||
# 4. Verwenden Sie separate E-Mail-Accounts für System-Alerts
|
||||
# 5. Testen Sie die SMTP-Konfiguration bevor Sie sie produktiv setzen
|
||||
|
||||
# ===== INSTALLATION =====
|
||||
|
||||
# 1. Kopieren Sie diese Datei:
|
||||
# cp config/error_monitoring.env.example config/error_monitoring.env
|
||||
#
|
||||
# 2. Passen Sie die Werte an Ihre Umgebung an
|
||||
#
|
||||
# 3. Laden Sie die Umgebungsvariablen:
|
||||
# source config/error_monitoring.env
|
||||
#
|
||||
# 4. Oder verwenden Sie python-dotenv:
|
||||
# pip install python-dotenv
|
||||
# # Dann in Ihrer app.py: load_dotenv('config/error_monitoring.env')
|
||||
|
||||
# ===== TESTING =====
|
||||
|
||||
# Zum Testen des Error-Monitoring-Systems:
|
||||
# python -c "from utils.error_monitor import test_error_monitoring; test_error_monitoring()"
|
Reference in New Issue
Block a user