Alerting: Update alerting module to 58ba6c617ff05eb1d6f65c59d369a6a16923dff6 (#102812)

* remove feature flag alertingAlertmanagerExtraDedupStage
* use most recent version of fork of alertmanager

---------

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
alerting-team[bot]
2025-03-26 15:15:10 -04:00
committed by GitHub
co-authored by Yuri Tseretyan
parent 3d1497b56a
commit 6df99a6224
13 changed files with 19 additions and 61 deletions
-18
View File
@@ -1683,24 +1683,6 @@ 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,
},
{
Name: "newLogsPanel",
Description: "Enables the new logs panel in Explore",
-2
View File
@@ -223,8 +223,6 @@ exploreMetricsUseExternalAppPlugin,preview,@grafana/observability-metrics,false,
datasourceConnectionsTab,privatePreview,@grafana/plugins-platform-backend,false,false,true
fetchRulesUsingPost,experimental,@grafana/alerting-squad,false,false,false
alertingConversionAPI,experimental,@grafana/alerting-squad,false,false,false
alertingAlertmanagerExtraDedupStage,experimental,@grafana/alerting-squad,false,true,false
alertingAlertmanagerExtraDedupStageStopPipeline,experimental,@grafana/alerting-squad,false,true,false
newLogsPanel,experimental,@grafana/observability-logs,false,false,true
grafanaconThemes,experimental,@grafana/grafana-frontend-platform,false,true,false
pluginsCDNSyncLoader,experimental,@grafana/plugins-platform-backend,false,false,false
1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
223 datasourceConnectionsTab privatePreview @grafana/plugins-platform-backend false false true
224 fetchRulesUsingPost experimental @grafana/alerting-squad false false false
225 alertingConversionAPI experimental @grafana/alerting-squad false false false
alertingAlertmanagerExtraDedupStage experimental @grafana/alerting-squad false true false
alertingAlertmanagerExtraDedupStageStopPipeline experimental @grafana/alerting-squad false true false
226 newLogsPanel experimental @grafana/observability-logs false false true
227 grafanaconThemes experimental @grafana/grafana-frontend-platform false true false
228 pluginsCDNSyncLoader experimental @grafana/plugins-platform-backend false false false
-8
View File
@@ -903,14 +903,6 @@ const (
// Enable the alerting conversion API
FlagAlertingConversionAPI = "alertingConversionAPI"
// 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"
// FlagNewLogsPanel
// Enables the new logs panel in Explore
FlagNewLogsPanel = "newLogsPanel"
+4 -2
View File
@@ -165,7 +165,8 @@
"metadata": {
"name": "alertingAlertmanagerExtraDedupStage",
"resourceVersion": "1738251165994",
"creationTimestamp": "2025-01-30T15:32:45Z"
"creationTimestamp": "2025-01-30T15:32:45Z",
"deletionTimestamp": "2025-03-25T16:57:43Z"
},
"spec": {
"description": "enables extra deduplication stage in alertmanager that checks that timestamps of the pipeline and the current state are matching",
@@ -180,7 +181,8 @@
"metadata": {
"name": "alertingAlertmanagerExtraDedupStageStopPipeline",
"resourceVersion": "1738251165994",
"creationTimestamp": "2025-01-30T15:32:45Z"
"creationTimestamp": "2025-01-30T15:32:45Z",
"deletionTimestamp": "2025-03-25T16:57:43Z"
},
"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",
@@ -11,7 +11,6 @@ import (
alertingHttp "github.com/grafana/alerting/http"
alertingNotify "github.com/grafana/alerting/notify"
"github.com/grafana/alerting/notify/stages"
"github.com/grafana/alerting/receivers"
alertingTemplates "github.com/grafana/alerting/templates"
"github.com/prometheus/alertmanager/config"
@@ -125,15 +124,6 @@ func NewAlertmanager(ctx context.Context, orgID int64, cfg *setting.Cfg, store A
},
}
l := log.New("ngalert.notifier.alertmanager", "org", orgID)
action := stages.Disabled
if featureToggles.IsEnabledGlobally(featuremgmt.FlagAlertingAlertmanagerExtraDedupStage) {
if featureToggles.IsEnabledGlobally(featuremgmt.FlagAlertingAlertmanagerExtraDedupStageStopPipeline) {
action = stages.StopPipeline
} else {
action = stages.LogOnly
}
l.Info("Initializing Alertmanager", "extra_dedup_stage", action)
}
amcfg := &alertingNotify.GrafanaAlertmanagerConfig{
ExternalURL: cfg.AppURL,
@@ -145,7 +135,6 @@ func NewAlertmanager(ctx context.Context, orgID int64, cfg *setting.Cfg, store A
MaxSilences: cfg.UnifiedAlerting.AlertmanagerMaxSilencesCount,
MaxSilenceSizeBytes: cfg.UnifiedAlerting.AlertmanagerMaxSilenceSizeBytes,
},
PipelineAndStateTimestampsMismatchAction: action,
}
gam, err := alertingNotify.NewGrafanaAlertmanager("orgID", orgID, amcfg, peer, l, alertingNotify.NewGrafanaAlertmanagerMetrics(m.Registerer, l))