mirror of
https://github.com/prometheus/alertmanager
synced 2025-02-18 19:46:54 +00:00
Update config docs to clarify fifo SNS deduplication strategy. Remove extra api call get topic attributes and use '.fifo' strategy instead
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
This commit is contained in:
parent
25e6d4efd9
commit
208bed6dee
@ -708,6 +708,8 @@ sigv4:
|
||||
|
||||
# SNS topic ARN, i.e. arn:aws:sns:us-east-2:698519295917:My-Topic
|
||||
# If you don't specify this value, you must specify a value for the phone_number or target_arn.
|
||||
# If you are using a FIFO SNS topic you should set a message group interval longer than 5 minutes
|
||||
# to prevent messages with the same group key being deduplicated by the SNS default deduplication window
|
||||
[ topic_arn: <tmpl_string>]
|
||||
|
||||
# Subject line when the message is delivered to email endpoints.
|
||||
|
@ -117,15 +117,7 @@ func (n *Notifier) Notify(ctx context.Context, alert ...*types.Alert) (bool, err
|
||||
publishInput.SetTopicArn(topicTmpl)
|
||||
|
||||
if n.isFifo == nil {
|
||||
checkFifo, err := checkTopicFifoAttribute(client, topicTmpl)
|
||||
if err != nil {
|
||||
if e, ok := err.(awserr.RequestFailure); ok {
|
||||
return n.retrier.Check(e.StatusCode(), strings.NewReader(e.Message()))
|
||||
} else {
|
||||
return true, err
|
||||
}
|
||||
}
|
||||
n.isFifo = &checkFifo
|
||||
n.isFifo = aws.Bool(n.conf.TopicARN[len(n.conf.TopicARN)-5:] == ".fifo")
|
||||
}
|
||||
if *n.isFifo {
|
||||
// Deduplication key and Message Group ID are only added if it's a FIFO SNS Topic.
|
||||
|
Loading…
Reference in New Issue
Block a user