Monitoring (R5.3): Betriebs-Alerts fuer Scheduler-/Queue-Ausfaelle

OperationalAlert loggt critical + Best-Effort-Mail an MONITORING_ALERT_EMAIL
(Fallback LEGAL_CONTACT_EMAIL, feature-flagged). Alle 6 Scheduler-Tasks mit
onFailure, Queue::failing-Listener; .env.example: LOG_STACK=daily als Prod-Soll.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-07-09 15:34:40 +00:00
parent ac870a4076
commit 6984846233
8 changed files with 250 additions and 6 deletions

26
config/monitoring.php Normal file
View file

@ -0,0 +1,26 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Betriebs-Alerts (R5.3)
|--------------------------------------------------------------------------
|
| Fehlgeschlagene Scheduler-Tasks und Queue-Jobs werden immer als
| `critical` ins Log geschrieben (rotierter `daily`-Channel) und – wenn
| aktiviert und eine Adresse gesetzt ist – zusätzlich per Best-Effort-Mail
| gemeldet. Die Mail ist bewusst nur die zweite Ebene: schlägt der Versand
| fehl, bleibt der Log-Eintrag als verlässliche Spur bestehen.
|
*/
'alerts' => [
'enabled' => (bool) env('MONITORING_ALERTS_ENABLED', true),
// Ops-Postfach. Fällt auf die zentrale Rechts-/Betreiber-Adresse
// zurück, solange kein dediziertes Monitoring-Postfach gesetzt ist.
'mail_to' => env('MONITORING_ALERT_EMAIL', env('LEGAL_CONTACT_EMAIL', 'info@pressekonto.com')),
],
];