AWS Fargate usage metrics
You can use CloudWatch usage metrics to provide visibility into your accounts usage of resources. Use these metrics to visualize your current service usage on CloudWatch graphs and dashboards.
AWS Fargate usage metrics correspond to AWS service quotas. You can configure alarms that alert you when your usage approaches a service quota. For more information about Fargate service quotas, see AWS Fargate service quotas.
AWS Fargate publishes the following metrics in the AWS/Usage
namespace.
Metric |
Description |
---|---|
|
The total number of the specified resource running on your account. The resource is defined by the dimensions associated with the metric. |
The following dimensions are used to refine the usage metrics that are published by AWS Fargate.
Dimension |
Description |
---|---|
|
The name of the AWS service containing the resource. For AWS Fargate usage
metrics, the value for this dimension is |
|
The type of entity that is being reported. Currently, the only valid value for
AWS Fargate usage metrics is |
|
The type of resource that is running. The type of resource that is running.
Currently, the only valid value for AWS Fargate usage metrics is
|
|
The class of resource being tracked. The class of resource being tracked. For
AWS Fargate usage metrics with vCPU as the value of the Resource dimension, the
valid values are |
Creating a CloudWatch alarm to monitor Fargate resource usage metrics
AWS Fargate provides CloudWatch usage metrics that correspond to the AWS service quotas for Fargate On-Demand and Fargate Spot resource usage. In the Service Quotas console, you can visualize your usage on a graph and configure alarms that alert you when your usage approaches a service quota. For more information, see AWS Fargate usage metrics.
Use the following steps to create a CloudWatch alarm based on one of the Fargate resource usage metrics.
To create an alarm based on your Fargate usage quotas (AWS Management Console)
Open the Service Quotas console at https://console.aws.amazon.com/servicequotas/
. -
In the navigation pane, choose AWS services.
-
From the AWS services list, search for and select AWS Fargate.
-
In the Service quotas list, select the Fargate usage quota you want to create an alarm for.
-
In the Amazon CloudWatch Events alarms section, choose Create.
-
For Alarm threshold, choose the percentage of your applied quota value that you want to set as the alarm value.
-
For Alarm name, enter a name for the alarm and then choose Create.