AWS ECS¶
Amazon ECS features integrated with Amazon Web Services Fargate
serverless compute engine, using TrueWatch to monitor its service runtime.
Configuration¶
Install Func¶
It is recommended to enable the TrueWatch integration - extension - hosted Func: all prerequisites are automatically installed. Please continue with the script installation.
If you deploy Func on your own, refer to Self-hosted Func
Installation Script¶
Note: Please prepare an Amazon AK that meets the requirements in advance (for simplicity, you can directly grant global read-only permissions
ReadOnlyAccess
).
To synchronize EC2 cloud resource monitoring data, we install the corresponding collection script: TrueWatch Integration (AWS-ECS Collection)
After clicking [Install], enter the corresponding parameters: Amazon AK, Amazon account name.
Click [Deploy Startup Script], and the system will automatically create a Startup
script set and automatically configure the corresponding startup script.
In addition, you can see the corresponding automatic trigger configuration in [Manage / Automatic Trigger Configuration]. Click [Execute]to run it immediately without waiting for the scheduled time. After a short while, you can view the execution task records and corresponding logs.
We collect some configurations by default. For details, see the Metrics section Custom Cloud Object Metrics Configuration
Verification¶
- In [Manage / Automatic Trigger Configuration], confirm whether the corresponding tasks have the corresponding automatic trigger configurations, and check the corresponding task records and logs for any abnormalities.
- On the TrueWatch platform, in [Infrastructure / Custom], check if there is asset information.
- On the TrueWatch platform, in [Metrics], check if there is corresponding monitoring data.
Metrics¶
After configuring Amazon CloudWatch, the default metric set is as follows. You can collect more metrics through configuration. Amazon CloudWatch Metrics Details
Instance Metrics¶
AWS/ECS
related metrics.
Metric | Description |
---|---|
CPUUtilization |
Service CPU utilization (a metric filtered by ClusterName and ServiceName) is calculated by dividing the total number of CPU units used by tasks belonging to the service by the total number of CPU units reserved for tasks belonging to the service. The service CPU utilization metric applies to tasks using Fargate and EC2 launch types. Unit: Percentage |
MemoryUtilization |
Service memory utilization (a metric filtered by ClusterName and ServiceName) is calculated by dividing the total amount of memory used by tasks belonging to the service by the total amount of memory reserved for tasks belonging to the service. The service memory utilization metric applies to tasks using Fargate and EC2 launch types. Unit: Percentage |
Objects¶
The collected AWS ECS object data structure can be viewed from [Infrastructure - Custom].
{
"measurement": "aws_ecs",
"tags": {
"RegionId": "cn-northwest-1",
"clusterArn": "arn:aws-cn:***",
"clusterName": "Harry_NodeJs",
"name": "Harry_NodeJs",
"status": "ACTIVE"
},
"fields": {
"activeServicesCount": 1,
"configuration": "{}",
"message": "{Instance JSON Data}",
"pendingTasksCount": 0,
"registeredContainerInstancesCount": 0,
"runningTasksCount": 1,
"statistics": "[]"
}
}
Note: Fields in
tags
andfields
may change with subsequent updates.