feat: Add "correlate" rule type to deduplication rules#6568
Open
ausias-armesto wants to merge 7 commits into
Open
feat: Add "correlate" rule type to deduplication rules#6568ausias-armesto wants to merge 7 commits into
ausias-armesto wants to merge 7 commits into
Conversation
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.
Summary
Closes #6567
Extends the deduplication rule model with a
rule_typefield (split|correlate) to support correlating related alerts across different fingerprints — without merging them or losing per-alert detail.What changed
AlertDeduplicationRulegains arule_typefield:splitfingerprint_fields. All existing rules default to this.correlatecorrelation_fingerprintfromfingerprint_fieldswithout touching the primary fingerprint.Each provider can have one rule of each type simultaneously.
AlertDtocorrelation_fingerprintstr | Nonecorrelaterule. Set on every alert that matches the rule.is_correlatedboolTruewhen another active (non-resolved, non-suppressed) alert with the samecorrelation_fingerprintalready exists. The first alert in a group isFalse; subsequent ones areTrue.correlated_tostr | NoneNonefor the representative itself.Pipeline
Files changed
rule_typeon deduplication rules;correlation_fingerprint(indexed) on last alertscorrelation_fingerprint,is_correlated, andcorrelated_tofieldsis_correlated/correlated_tobefore savecorrelation_fingerprintrule_typecolumn (existing rules default tosplit);correlation_fingerprintcolumn on last alertsrule_typesupport with a split/correlate selector and conflict detectionMigration notes
All existing custom deduplication rules are migrated to
rule_type="split"— this is correct because the original purpose of the feature was exclusively to control fingerprint computation (alert identity).Action required after deploying: Review your existing custom rules. If any rule was created with the intent of correlating related alerts (e.g., grouping pod instances), change its
rule_typeto"correlate"via the UI.Usage example
Goal: The same alert fires on multiple instances simultaneously. Each instance alert should be stored individually, but only one notification should fire per group.
Split rule (controls identity — keep existing):
fingerprint_fields: [fingerprint, startsAt]Correlate rule (new):
fingerprint_fields: [alertname, service]Workflow condition (only notify for the representative alert):