feat: live последние события на Dashboard; retention, health, runbook
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -37,4 +37,8 @@ SAC_BRUTE_FORCE_THRESHOLD=30
|
||||
SAC_PRIVILEGE_SPIKE_WINDOW_MINUTES=10
|
||||
SAC_PRIVILEGE_SPIKE_THRESHOLD=10
|
||||
|
||||
# Retention (systemd sac-retention.timer)
|
||||
SAC_EVENTS_RETENTION_DAYS=90
|
||||
SAC_PROBLEMS_RETENTION_DAYS=180
|
||||
|
||||
CORS_ORIGINS=*
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Security Alert Center data retention
|
||||
After=network-online.target postgresql.service
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=sac
|
||||
Group=sac
|
||||
WorkingDirectory=/opt/security-alert-center/backend
|
||||
EnvironmentFile=/opt/security-alert-center/config/sac-api.env
|
||||
ExecStart=/opt/security-alert-center/backend/.venv/bin/python -m app.jobs.retention
|
||||
Nice=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Daily SAC retention purge
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
RandomizedDelaySec=900
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user