presseportale/config/monitoring.php
Kevin Adametz 002dc08b5c privacy: Löschfristen für Aktivitätsverlauf (395 Tage) und API-Zugriffsprotokoll (90 Tage)
Beide Tabellen hatten keine Frist; activity_events trägt Namen und Adressen
im Klartext, api_usage_logs IP und User-Agent. MassPrunable, täglich 04:05
über model:prune, Fristen in config/monitoring.php (Roadmap 4.2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 13:35:54 +00:00

107 lines
4.1 KiB
PHP
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.

<?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')),
// Zweiter Alarmweg (Monitoring-Plan M3): Push über ntfy, JSON-POST
// an die Basis-URL. Ohne URL oder Topic aus.
'ntfy' => [
'url' => env('MONITORING_NTFY_URL'),
'topic' => env('MONITORING_NTFY_TOPIC'),
'token' => env('MONITORING_NTFY_TOKEN'),
'priority' => (int) env('MONITORING_NTFY_PRIORITY', 4),
],
],
/*
|--------------------------------------------------------------------------
| Browserfehler (Monitoring-Plan 1.2)
|--------------------------------------------------------------------------
|
| Eigenes GlitchTip-Projekt für JavaScript-Fehler. Die DSN ist öffentlich
| (steht im HTML), sie erlaubt nur das Einliefern von Ereignissen. Ohne
| DSN wird kein Skript eingebunden.
|
*/
'browser' => [
'dsn' => env('SENTRY_BROWSER_DSN'),
'sample_rate' => (float) env('SENTRY_BROWSER_SAMPLE_RATE', 1.0),
],
/*
|--------------------------------------------------------------------------
| Health-Endpunkt und Scheduler-Herzschlag (Monitoring-Plan 1.4, 1.5)
|--------------------------------------------------------------------------
|
| `/health` antwortet nur mit gültigem Token (Bearer-Header oder
| `?token=`); ohne konfiguriertes Token gibt es den Endpunkt nicht (404).
| Der Scheduler schreibt jede Minute einen Herzschlag; bleibt er aus, ist
| der Cron-Eintrag weg oder der Server hängt.
|
*/
'health' => [
'token' => env('MONITORING_HEALTH_TOKEN'),
'queue_backlog_critical_seconds' => (int) env('MONITORING_QUEUE_BACKLOG_SECONDS', 300),
'disk_min_free_percent' => (float) env('MONITORING_DISK_MIN_FREE_PERCENT', 10),
],
/*
|--------------------------------------------------------------------------
| Fehlgeschlagene Anmeldungen mit unbekannter Adresse (Nachtrag 1.7)
|--------------------------------------------------------------------------
|
| Werden nicht einzeln im Aktivitäts-Verlauf protokolliert, sondern je Tag,
| Einstieg und Quelle gezählt (failed_login_tallies). Der Systemstatus
| warnt ab `warn_per_day` Versuchen am Tag.
|
*/
'failed_logins' => [
'retention_days' => (int) env('MONITORING_FAILED_LOGIN_RETENTION_DAYS', 90),
'warn_per_day' => (int) env('MONITORING_FAILED_LOGIN_WARN_PER_DAY', 1000),
],
/*
|--------------------------------------------------------------------------
| Löschfristen der Protokolle (Roadmap 4.2)
|--------------------------------------------------------------------------
|
| Aktivitäts-Verlauf (activity_events: Anmeldungen, Statuswechsel,
| Admin-Aktionen) wie die Nutzungsstatistik in DSE 5a nach 395 Tagen;
| API-Zugriffsprotokoll (api_usage_logs, mit IP und User-Agent) nach
| 90 Tagen. Entfernt täglich um 04:05 über `model:prune`.
|
*/
'retention' => [
'activity_events_days' => (int) env('MONITORING_ACTIVITY_RETENTION_DAYS', 395),
'api_usage_logs_days' => (int) env('MONITORING_API_USAGE_RETENTION_DAYS', 90),
],
'scheduler' => [
'heartbeat_warn_minutes' => 3,
'heartbeat_critical_minutes' => 10,
],
];