In Flashduty On-call
You can get the integration push URL in either of the following ways.Use a dedicated integration
Choose this option if all alerts go to one channel. It’s the simpler setup.View dedicated integration setup steps
View dedicated integration setup steps
- In the Flashduty console, select Channel and open a channel
- Select Configuration → Integrations → Private integration, then click Add integration
- Choose AWS CloudWatch integration, click Save to generate a card
- Open the generated integration card and copy the Push URL
Use a shared integration
Choose this option if you need to route alerts to different channels based on the alert payload.Configure in AWS
1
Create a topic in Amazon SNS
Where: Amazon SNS › Topics › Create topic
Click Create topic.
2
Create an HTTPS subscription to Flashduty in Amazon SNS
Where: Amazon SNS › Subscriptions › Create subscription
Return to the Subscriptions page. The status
Click Create subscription.
Return to the Subscriptions page. The status Confirmed means Flashduty has confirmed the subscription.The subscription works with Raw message delivery on or off. With raw delivery off, SNS includes the
Subject, which becomes the alert title of plain-text messages, so we recommend keeping it off.3
Select the topic in the Amazon CloudWatch alarm
Where: Amazon CloudWatch › Alarms › All alarms › Create alarm › Configure actions › Notification (existing alarm: select the alarm, then Actions › Edit, click Next to reach step 2 Configure actions, and click Update alarm when done)
Save the alarm.
Save the alarm.4
Trigger an alarm state in AWS and confirm
Where: A terminal with the AWS CLI configuredThe state change lasts only until the next alarm evaluation. A few seconds later, go back to Flashduty. The integration shows a latest event time, which means the setup works. Run the command again with
--state-value OK to confirm that the alert recovers automatically.Other AWS services that publish to SNS
Send the notifications of these services to the sameFlashduty topic. No other setup is needed.
Cost anomaly detection
In Billing and Cost Management → Cost Anomaly Detection → Alert subscriptions, create a subscription, setAlerting frequency to Individual alerts, and select the SNS topic Flashduty as the recipient. The topic access policy must allow costalerts.amazonaws.com to publish.
Each anomaly (anomalyId) maps to one alert, and later notifications for the same anomaly merge into it. Cost Anomaly Detection sends no notification when an anomaly ends, so close the alert manually.
Amazon Managed service for Prometheus
Add ansns_configs receiver that points to the Flashduty topic in the workspace alert manager configuration. Use the default_template from the AWS guide Configure alert manager to send messages to Amazon SNS as JSON so that messages are sent as JSON:
- Each alert gets its
fingerprintas the Alert Key.firingtriggers andresolvedrecovers - A
severitylabel ofcritical,warningorinfomaps to Critical, Warning or Info; any other value maps to Warning - Labels and annotations become Flashduty labels. The title is the
summaryannotation, oralertnamewhen it is absent
AWS budgets
In the budget Alert settings, choose Amazon SNS Alerts and enter the ARN of theFlashduty topic. The topic access policy must allow budgets.amazonaws.com to publish. Budgets notifications are plain text and are handled as described in “Other messages” below.
Other messages
Each unrecognized message (plain text or other JSON) creates one Warning alert. The Alert Key is the SNSMessageId, so an SNS retry of the same message does not create a second alert. The title is the SNS Subject, or the first line of the message when there is no subject. These alerts do not recover automatically.
Alert key
ALARM, INSUFFICIENT_DATA and OK of a CloudWatch alarm share one Alert Key; changes to the alarm name, threshold, reason or description do not split the alert. A CloudWatch alarm message without AlarmArn is rejected.
Status and severity
CloudWatch alarms have no severity.
ALARM and INSUFFICIENT_DATA map to Warning by default, and OK recovers the alert.To set a severity, add flashduty_severity: critical to the alarm’s Alarm description (critical, warning or info, case-insensitive, with : or =). For example:Labels
- Single-metric alarms:
trigger_metric_name,trigger_namespace,trigger_dimensions_<dimension name>and more. When the dimensions includeInstanceId, it is written toresource - Metric math and anomaly detection alarms: each query writes
trigger_expression_<query ID>,trigger_metric_<query ID>(namespace/metric name) andtrigger_dimensions_<dimension name>.metricandcheckcome from the query that returns data - Composite alarms:
alarm_ruleandtriggering_children(ARNs of the child alarms that triggered) - All alarms:
alarm_arn,aws_account_id,region,new_state_value,old_state_value
Troubleshooting
- Subscription stays in
Pending confirmation: Make sure the endpoint is the full push URL includingintegration_key, then run Request confirmation on the subscription in the SNS console - Flashduty returns a SubscribeURL error: Flashduty only visits subscription confirmation URLs on
sns.<region>.amazonaws.com,sns.<region>.amazonaws.com.cnandsns.<region>.amazonaws.eu. Make sure the subscription request comes from Amazon SNS - Alert does not recover: Make sure the
OKstate of the CloudWatch alarm also notifies theFlashdutytopic - Handling events in EventBridge: For GuardDuty, Security Hub, AWS Health and similar events, use the AWS EventBridge integration