v12 - feat(plugins/rule-flood-guard): auto-disable flooding correlation rules and notify via bell#2354
Merged
Merged
Conversation
…correlation rule by name
🛑 AI review — Sensitive area, extra care recommendedThis PR touches critical paths or introduces changes the model cannot judge with sufficient confidence. Review carefully before merging.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a new standalone plugin (
plugins/rule-flood-guard) that automatically disables correlation rules generating alert fatigue, and notifies the user through the notification bell.When a rule produces more than 50 open, non-deduplicated, top-level alerts within a rolling 24-hour window, the guard:
deduplicateBy/groupBy).Why
Some correlation rules, when misconfigured or missing
deduplicateBy/groupBy, flood the alerts list with individual, non-deduplicated alerts instead of grouping them. This causes alert fatigue: analysts stop paying attention to the alerts list and miss real signal. This is a safety net, not a fix for the root dedup-configuration problem (out of scope — see below).Changes
plugins/rule-flood-guard/(new)system_plugins_rule-flood-guard.yaml), no restart needed to tune threshold/window/interval.backend/modules/eventprocessing/PUT /internal/correlation-rule/deactivate) so the plugin can disable a rule by name.backend/modules/notifications/SYSTEMas a valid notification source (the enum value already existed but wasn't wired into request validation)..github/workflows/v12-deployment-pipeline.ymlTesting
Manually verified end-to-end against a local OpenSearch + Postgres + backend: created a real correlation rule, seeded 51 alerts, confirmed the guard disabled the rule (
changed:true), confirmed a retry was a no-op (changed:false, no duplicate notification), confirmed the notification appeared with the correct message. No automated tests added, matching this project's current test coverage convention.