AWS ECS¶
Amazon ECS integrates with the Amazon Web Services Fargate
serverless compute engine, using TrueWatch to monitor its service status.
Configuration¶
Install Func¶
It is recommended to activate the TrueWatch integration - extensions - DataFlux Func (Automata): all prerequisites are automatically installed, please proceed with the script installation.
If you want to deploy Func manually, refer to Manually Deploy Func
Activate Script¶
Note: Please prepare the required Amazon AK in advance (for simplicity, you can directly grant global read-only permissions
ReadOnlyAccess
)
Automata Activation Script¶
- Log in to the TrueWatch console
- Click the 【Integration】 menu, select 【Cloud Account Management】
- Click 【Add Cloud Account】, select 【AWS】, and fill in the required information on the interface. If you have already configured the cloud account information before, ignore this step
- Click 【Test】, if the test is successful, click 【Save】. If the test fails, please check if the related configuration information is correct and test again
- Click 【Cloud Account Management】, you can see the added cloud account in the list, click the corresponding cloud account to enter the details page
- Click the 【Integration】 button on the cloud account details page, find
AWS ECS
under theNot Installed
list, click the 【Install】 button, and the installation interface will pop up for installation.
Manual Activation Script¶
-
Log in to the Func console, click 【Script Market】, enter the TrueWatch script market, search:
integration_aws_ecs
-
Click 【Install】, then enter the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click 【Deploy Startup Script】, the system will automatically create a
Startup
script set and automatically configure the corresponding startup script. -
After activation, you can see the corresponding automatic trigger configuration in 「Management / Automatic Trigger Configuration」. Click 【Execute】 to execute it immediately without waiting for the scheduled time. After a while, you can check the execution task records and corresponding logs.
Verification¶
- In 「Management / Automatic Trigger Configuration」, confirm whether the corresponding task has the corresponding automatic trigger configuration, and you can also check the corresponding task records and logs to see if there are any exceptions
- In TrueWatch, check if there is asset information in 「Infrastructure / Custom」
- In TrueWatch, check if there is corresponding monitoring data in 「Metrics」
Metrics¶
After configuring Amazon CloudWatch, the default measurement is as follows, more metrics can be collected through configuration Amazon CloudWatch Metrics Details
Instance Metrics¶
AWS/ECS
related metrics.
Metric | Description |
---|---|
CPUUtilization |
Service CPU utilization (metrics filtered by ClusterName and ServiceName) is calculated by dividing the total CPU units used by the tasks belonging to the service by the total CPU units reserved for the tasks belonging to the service. The service CPU utilization metric is used for tasks using Fargate and EC2 launch types. Unit: Percentage |
MemoryUtilization |
Service memory utilization (metrics filtered by ClusterName and ServiceName) is calculated by dividing the total memory used by the tasks belonging to the service by the total memory reserved for the tasks belonging to the service. The service memory utilization metric is used for tasks using Fargate and EC2 launch types. Unit: Percentage |
Objects¶
The AWS ECS object data structure collected can be seen in 「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: The fields in
tags
andfields
may change with subsequent updates
```