Alerts and Actions Based on Anomaly Detection
You can create a custom series of alerts and actions using the workflow builder based on automatically identified anomalies.
Step 1: Configure the Anomaly Detection Metric
Create a metric in the Cost Intelligence dashboards.
- In the left main menu, select Cost Intelligence > Dashboard.
- In the Dashboard dropdown menu on the top right, click Cost Intelligence Anomaly Metrics.
- Click Actions > Edit.
- Click Add Chart.
Example
The example below shows how to generate a metric that identifies the percentage change of compute resources for a specific AWS region, comparing a day to its previous week.
-
On the left panel, click the Billing dataset.
-
On the right panel, click the Indicator chart
.
noteThe metric must be one of the three chart types: indicator, dial or bullet.
-
On the left panel, drag ServiceCategory to the Values field.
View clip
-
In the Values field, click the three vertical dots
and select Distinct Count.
-
In the menu in the right panel, click Comparison. The Date Column field opens. From the left panel, drag BillingPeriodStart into the Date Column field.
View clip
-
Select the two time periods to compare between in the Time Period field and the Comparison field. In this example:
- Time Period: select Today.
- Comparison field: select Last Week.
-
Make sure that the Type is percent %.
-
You can add a number of filters. For example, you can filter on provider, specific regions, and service category:
a. In the right panel, click Filters. b. Click Add Filters to open the list of columns for filtering. c. In the Column field, select Provider, and click the is field, select AWS. Click Apply. d. Click Add Filters again to filter according to a region. e. In the Column field, select Region, and select the relevant regions. Click Apply. f. Click Add Filters again to add a filter. Select ServiceCategory from the Columns dropdown list. g. Search for and select Compute.
View image
-
Click the Untitled Chart field and enter a unique name for the metric, such as Anomaly—AWS Compute US-East.
-
Click Save. The workflow is added to the dashboard.
-
Click Publish Dashboard. The metric is prepared for the workflow builder to create an anomaly alert.
Step 2: Create an Anomaly Detection Workflow
Create an alert flow with the workflow builder.
Example
The example below shows how to create an alert flow. You can create more complex flows.
-
In the left menu of the Cost Intelligence console, click Workflow Builder > Create New Flow.
-
Click the Untitled field and enter a name and description.
-
Go to Triggers and drag Scheduling to Add a trigger to start. Configure it to start today, to never end, and repeat every 1 day.
View clip
-
From the Conditions menu on the right panel, drag If to the Trigger widget in the workflow builder.
View clip
-
Click the arrow in the If Field widget. Select If Metric.
-
Select:
- Metric: Select the metric you created in Step 1. The metric you recently created is at the bottom of the list.
- Type of Value: Select % Change.
- Is: Select Greater than or equal to.
- Value: Enter an appropriate numeric value of the percentage.
-
From the Send Actions menu on the right panel, drag Send Email under the If condition that was created in the previous steps.
View clip
-
Configure the email:
- To: You can configure the email to send to a number of email addresses.
- Subject: Enter the subject of the email.
- Message: Enter the message of the email. In the body of the message, make sure to include the token that represents the value of the metric that triggered the email.
-
A basic anomaly detection flow is configured. Click Activate to validate the configuration and activate the flow.