Alerting: Extra dedup stage in Grafana Alertmanager (#99825)

* add feature flags

* update alerting module

* update grafana alertmanager to configure the extra dedup stage

---------

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
This commit is contained in:
Yuri Tseretyan
2025-01-31 11:12:38 -05:00
committed by GitHub
co-authored by Santiago
parent d0703cfdbd
commit 0be6e1bb86
14 changed files with 87 additions and 14 deletions
+18
View File
@@ -1772,6 +1772,24 @@ var (
HideFromAdminPage: true,
HideFromDocs: true,
},
{
Name: "alertingAlertmanagerExtraDedupStage",
Description: "enables extra deduplication stage in alertmanager that checks that timestamps of the pipeline and the current state are matching",
Stage: FeatureStageExperimental,
Owner: grafanaAlertingSquad,
HideFromAdminPage: true,
HideFromDocs: true,
RequiresRestart: true,
},
{
Name: "alertingAlertmanagerExtraDedupStageStopPipeline",
Description: "works together with alertingAlertmanagerExtraDedupStage, if enabled, it will stop the pipeline if the timestamps are not matching. Otherwise, it will emit a warning",
Stage: FeatureStageExperimental,
Owner: grafanaAlertingSquad,
HideFromAdminPage: true,
HideFromDocs: true,
RequiresRestart: true,
},
}
)
+2
View File
@@ -236,3 +236,5 @@ grafanaAdvisor,experimental,@grafana/plugins-platform-backend,false,false,false
elasticsearchImprovedParsing,experimental,@grafana/aws-datasources,false,false,false
datasourceConnectionsTab,experimental,@grafana/plugins-platform-backend,false,false,true
fetchRulesUsingPost,experimental,@grafana/alerting-squad,false,false,false
alertingAlertmanagerExtraDedupStage,experimental,@grafana/alerting-squad,false,true,false
alertingAlertmanagerExtraDedupStageStopPipeline,experimental,@grafana/alerting-squad,false,true,false
1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
236 elasticsearchImprovedParsing experimental @grafana/aws-datasources false false false
237 datasourceConnectionsTab experimental @grafana/plugins-platform-backend false false true
238 fetchRulesUsingPost experimental @grafana/alerting-squad false false false
239 alertingAlertmanagerExtraDedupStage experimental @grafana/alerting-squad false true false
240 alertingAlertmanagerExtraDedupStageStopPipeline experimental @grafana/alerting-squad false true false
+8
View File
@@ -954,4 +954,12 @@ const (
// FlagFetchRulesUsingPost
// Use a POST request to list rules by passing down the namespaces user has access to
FlagFetchRulesUsingPost = "fetchRulesUsingPost"
// FlagAlertingAlertmanagerExtraDedupStage
// enables extra deduplication stage in alertmanager that checks that timestamps of the pipeline and the current state are matching
FlagAlertingAlertmanagerExtraDedupStage = "alertingAlertmanagerExtraDedupStage"
// FlagAlertingAlertmanagerExtraDedupStageStopPipeline
// works together with alertingAlertmanagerExtraDedupStage, if enabled, it will stop the pipeline if the timestamps are not matching. Otherwise, it will emit a warning
FlagAlertingAlertmanagerExtraDedupStageStopPipeline = "alertingAlertmanagerExtraDedupStageStopPipeline"
)
+30
View File
@@ -143,6 +143,36 @@
"codeowner": "@grafana/alerting-squad"
}
},
{
"metadata": {
"name": "alertingAlertmanagerExtraDedupStage",
"resourceVersion": "1738251165994",
"creationTimestamp": "2025-01-30T15:32:45Z"
},
"spec": {
"description": "enables extra deduplication stage in alertmanager that checks that timestamps of the pipeline and the current state are matching",
"stage": "experimental",
"codeowner": "@grafana/alerting-squad",
"requiresRestart": true,
"hideFromAdminPage": true,
"hideFromDocs": true
}
},
{
"metadata": {
"name": "alertingAlertmanagerExtraDedupStageStopPipeline",
"resourceVersion": "1738251165994",
"creationTimestamp": "2025-01-30T15:32:45Z"
},
"spec": {
"description": "works together with alertingAlertmanagerExtraDedupStage, if enabled, it will stop the pipeline if the timestamps are not matching. Otherwise, it will emit a warning",
"stage": "experimental",
"codeowner": "@grafana/alerting-squad",
"requiresRestart": true,
"hideFromAdminPage": true,
"hideFromDocs": true
}
},
{
"metadata": {
"name": "alertingApiServer",