Fargate metrics
You can collect system metrics and CloudWatch usage metrics for Amazon Fargate.
Application metrics
For applications running on Amazon EKS and Amazon Fargate, you can use the Amazon Distro
for OpenTelemetry (ADOT). ADOT allows you to collect system metrics and send them to
CloudWatch Container Insights dashboards. To get started with ADOT for applications
running on Fargate, see Using
CloudWatch Container Insights with Amazon Distro for OpenTelemetry
Usage metrics
You can use CloudWatch usage metrics to provide visibility into your account's usage of resources. Use these metrics to visualize your current service usage on CloudWatch graphs and dashboards.
Amazon Fargate usage metrics correspond to Amazon service quotas. You can configure alarms that alert you when your usage approaches a service quota. For more information about Fargate service quotas, see Amazon EKS service quotas.
Amazon Fargate publishes the following metrics in the Amazon/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 Amazon Fargate.
Dimension |
Description |
---|---|
|
The name of the Amazon service containing the resource. For
Amazon Fargate usage metrics, the value for this dimension is
|
|
The type of entity that's being reported. Currently, the only
valid value for Amazon Fargate usage metrics is
|
|
The type of resource that's running. Currently, Amazon Fargate returns information on your Fargate
On-Demand usage. The resource value for Fargate On-Demand
usage is NoteFargate On-Demand usage combines Amazon EKS Pods using
Fargate, Amazon ECS tasks using the Fargate launch type and
Amazon ECS tasks using the |
|
The class of resource being tracked. Currently, Amazon Fargate doesn't use the class dimension. |
Creating a CloudWatch alarm to monitor Fargate resource usage metrics
Amazon Fargate provides CloudWatch usage metrics that correspond to the Amazon service quotas for Fargate On-Demand resource usage. In the Service Quotas console, you can visualize your usage on a graph. You can also configure alarms that alert you when your usage approaches a service quota. For more information, see Fargate metrics.
Use the following steps to create a CloudWatch alarm based on the Fargate resource usage metrics.
To create an alarm based on your Fargate usage quotas (Amazon Web Services Management Console)
Open the Service Quotas console at https://console.amazonaws.cn/servicequotas/
. -
In the left navigation pane, choose Amazon services.
-
From the Amazon services list, search for and select Amazon Fargate.
-
In the Service quotas list, choose the Fargate usage quota you want to create an alarm for.
-
In the Amazon CloudWatch 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.