Retention for expired decisions, independent of alert retention
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
/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.
- 主要言語
- Go
- スター
- 15.1k
- フォーク
- 726
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 15
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
crowdsecurity/crowdsec のほかの issue
-
[docker] Align build and debian release対応中かも @albundy83 が 2 日前に担当しました。 オープンkind/enhancement needs/triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
crowdsecurity/crowdsec#4803 · コメント 3 件 ·
メンテナーはふだん 2 日以内に返信
-
Bucket queues preallocate all their slots when the bucket is created対応中かも @AdzerKI が 4 日前に担当しました。 オープンkind/bug needs/triage os/linux
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
crowdsecurity/crowdsec#4799 · コメント 3 件 ·
メンテナーはふだん 2 日以内に返信
-
"Machine is not enrolled in the console, can't synchronize with the console" should not be an error log対応中かも @bharathvemula が今日担当しました。 オープンkind/bug needs/triage os/linux
難易度 2/5 1〜3時間 初心者へのやさしさ 30/100
crowdsecurity/crowdsec#4809 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
kind/bug needs/triage os/linux
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
crowdsecurity/crowdsec#4797 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
needs/kind needs/triage
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
crowdsecurity/crowdsec#4795 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
crowdsecurity/crowdsec の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
-
Component: Backup and Restore Type: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
needs-acceptance wg/router-models-inference-runtime
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
vllm-project/semantic-router#6018 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
eugenioenko/ttt#1461 ·
メンテナーはふだん 1 日以内に返信
-
tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信