AWS CloudWatch Alarms
The built-in AWS CloudWatch Alarms trigger initiates a flow when it receives a signal from an AWS CloudWatch alarm.
Add the AWS CloudWatch Alarms trigger to the canvas
- 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 URL — you'll use this to set up the webhook in AWS CloudWatch. Alternatively, you can create an integration user to use 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.
- Click Done.
- On the flow canvas, 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.
Configure the webhook
- 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 to notify when the alert fires.
- For URL authentication, use an ampersand to attach recipients. For example, if you want to notify Emma Pearson and the on-call members in the group responsible for the Antares service, you'd add &recipients=epearson,antares to the end of the URL.
- For other authentication types, use a question mark to attach recipients. For example, if you want to notify Barry Gull and the on-call members in the group responsible for the Cassiopeia service, you'd add ?recipients=bgull,cassiopeia to the end of 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.
Outputs
AWS CloudWatch Alarms trigger outputs
The trigger has the following outputs you can use as inputs to steps further along the flow.
Label |
Description |
---|---|
Recipients |
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 the 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 |
Type of notification. Valid values are:
|
Raw Request | JSON representation of the request that can be parsed separately to get additional context on outputs. |