AWS CloudWatch Alerts
The built-in AWS CloudWatch trigger initiates flows when it receives a request from a webhook in AWS CloudWatch.
- Go to the Triggers tab in the palette, expand the App Triggers section and drag the trigger onto the canvas.
- Double-click the trigger (or click the pencil icon).
- Set the authenticating user and then copy the URL — you'll use this to set up the webhook in AWS CloudWatch. Alternatively, you can create an integration user and use it as the authenticating user.
- Click the Flood Control tab to edit the trigger's default flood control settings. For more information about these settings, see Trigger Flood Control.
- Connect the steps you want to run when xMatters receives a request to that URL.
You're now ready to configure AWS CloudWatch to target the trigger.
Configure AWS CloudWatch to send requests to the trigger URL
To have AWS CloudWatch send alerts to the flow trigger, you need to configure a webhook and set it to use the trigger URL.
- In AWS CloudWatch, go to the Amazon SNS panel.
- Click Topics, then click Create Topic to create a Simple Notification Service (SNS) Topic for the xMatters webhook. You can also edit an existing SNS topic.
- Give the webhook a unique name and a display name, then click Create topic.
- On the Amazon SNS panel, click Subscriptions, then click Create Subscription.
- In the Details section:
- In the Topic ARN box, select the SNS Topic you just created.
- In the Protocol box, select HTTPS.
- In the Endpoint field, paste the trigger URL.
- Add the target names of any recipients you want xMatters to notify when the alert fires.
- For example, if you want to notify Emma Pearson, Mary McBride, and the on-call members in the Monitor Team responsible for the service, you'd add ?recipients=epearson,mmcbride,monitor%20team to the URL. You must URL-encode any special characters or spaces in the target names.
- Click Create Subscription.
You're ready to use the webhook to trigger automated flows, including steps such as sending alerts and initiating incidents, though we always recommend testing before putting things into use.
The trigger has the following outputs you can use as inputs to steps further along the flow.
|List of targeted recipients. Recipients are set by adding a recipients query parameter to the trigger URL.|
|Signal Mode||Determines the path the flow will take, based on the values of Type and New State Value parameters.|
|Signal ID||Key or identifier used to terminate or correlate signals.|
|Alarm Name||Name of the alarm as provided by AWS CloudWatch.|
|Alarm Description||Description of the alarm as provided by AWS CloudWatch.|
|Message ID||Unique ID of the message in AWS CloudWatch.|
|New State Reason||Reason for the new state in the AWS CloudWatch alarm.|
|New State value||
Value of the new state in AWS CloudWatch. Valid values are:
|Region||Region of the affected resources.|
|SNS Topic||Name of the Simple Notification Service (SNS) that fired the message.|
|State Change Time||Time the alarm state changed.|
|Subject||Subject of the message from AWS CloudWatch.|
|Subscribe URL||URL used to confirm the subscription endpoint for the AWS CloudWatch SNS topic.|
Type of notification. Valid values are:
|Raw Request||JSON representation of the request that can be parsed separately to get additional context on outputs.|