Retention for expired decisions, independent of alert retention
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
Direzione di ricerca
Start by reading the existing flush.max_age behavior and FlushOrphans, then review issue #4613 for measurements of the longestDecisionForScopeTypeValue query shape. The change should allow expired decisions to be retained independently of their parent alerts while preserving the configured window for reporting deletions to bouncers. Verify the new behavior and configuration with tests, including the stated trade-off for inspecting old alerts.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
/kind enhancement
What would you like to be added?
A retention setting for expired decisions that's independent of alert retention — something like db_config.flush.decisions_max_age. Expired decision rows would be deleted that long after they expire, separately from their parent alert, much as FlushOrphans already deletes ownerless expired decisions.
Why is this needed?
flush.max_age is currently doing three unrelated jobs:
- how long alerts stay queryable
- how much dead weight every stream query walks through
- how long an expired decision stays reportable to bouncers in the
deletedarray
There's no way to tune them separately, and 1 and 3 pull against each other.
On our LAPI (~1.2k bouncers, 60s poll) decisions sits at 612k rows with 301k already expired: a 6-hourly blocklist import with an 8h TTL against max_age: 26h leaves each batch dead in the table for 18h. Every startup=true resync walks all of it through the longestDecisionForScopeTypeValue anti-join — #4613 has measurements for that query shape.
Pushing the ban TTL past max_age fixes the bloat, since #4527 keeps an alert alive while its decisions are active. But then the alert is flushed within a minute of the last decision expiring and the cascade hard-deletes the rows, so a bouncer only learns about the unban if it polls inside that ~60s window. Roughly half the fleet misses it.
What I'd like to be able to configure: 7d of alert history, deletions reported for 12h, and not carrying 7d of expired decisions in every stream query.
The obvious cost is that cscli alerts inspect on an old alert would show fewer decisions than it does today. That seems like the right trade to me, but it's a behaviour change worth naming.
- Lingua principale
- Go
- Stelle
- 15.1k
- Fork
- 726
- Merge medio
- 2g 51m
- PR unite (30g)
- 18
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di crowdsecurity/crowdsec
-
[docker] Align build and debian releaseForse già presa @albundy83 l’ha presa 1 giorno fa. Apertakind/enhancement needs/triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
crowdsecurity/crowdsec#4803 · 3 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Bucket queues preallocate all their slots when the bucket is createdForse già presa @AdzerKI l’ha presa 3 giorni fa. Apertakind/bug needs/triage os/linux
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
crowdsecurity/crowdsec#4799 · 3 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
kind/bug needs/triage os/linux
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
crowdsecurity/crowdsec#4797 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
needs/kind needs/triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
crowdsecurity/crowdsec#4795 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
kind/bug needs/triage os/linux
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
crowdsecurity/crowdsec#4790 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di crowdsecurity/crowdsec
Issue simili
-
component/mesheryctl kind/bug language/go
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
meshery/meshery#22993 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
-
frontend size:S
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
shukiv/jabali-panel#2423 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100