AWS ECR
Collect Metrics Data from AWS Elastic Container Registry
Configuration¶
Install Func¶
It is recommended to activate the Guance Integration - Extensions - DataFlux Func (Automata): All prerequisites are automatically installed. Please proceed with the script installation.
For self-deploying Func, refer to Self-deploying 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 Guance 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 ECRunder theNot Installedlist, click the 【Install】 button, and the installation interface will pop up for installation.
Manual Activation Script¶
Note: Please prepare the required Amazon AK in advance (for simplicity, you can directly grant the global read-only permission
ReadOnlyAccess).
-
Log in to the Func console, click on 【Script Market】, and enter the Guance Script Market. Search for:
integration_aws_ecr. -
Click 【Install】, then input the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click 【Deploy Startup Script】, the system will automatically create the
Startupscript set and configure the corresponding startup scripts. -
After enabling, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click 【Execute】 to immediately execute once without waiting for the scheduled time. Wait a moment, and you can check the execution task records and corresponding logs.
Verification¶
- In 「Manage / Automatic Trigger Configuration」, confirm whether the corresponding task has the automatic trigger configuration. You can also check the corresponding task records and logs for any anomalies.
- In Guance, check if asset information exists in 「Infrastructure - Resource Catalog」.
- In Guance, check if there are corresponding monitoring data in 「Metrics」.
Metrics¶
Configure Amazon CloudWatch to collect more metrics. Amazon CloudWatch Metrics Details
AWS Elastic Container Registry metrics are under the aws_AWS/ECR Measurement. The description column includes the description of each metric along with its unit and statistics.
| Metric | Description | Unit |
|---|---|---|
RepositoryPullCount |
Total number of image pulls from the repository | Count |
Objects¶
The collected AWS Elastic Container Registry object data structure can be viewed in 「Infrastructure - Resource Catalog」.
{
"measurement": "aws_ecr",
"tags": {
"repositoryArn" : "xxxxxxxx",
"registryId" : "03babd100fxxxxxxx",
"repositoryName" : "test",
"repositoryUri" : "urlxxxxxx",
"RegionId" : "03babd100fxxxxxxx"
},
"fields": {
"createdAt" : "3",
"imageTagMutability" : "2025/07/18 17:23:04",
"encryptionType" : "xxx"
}
}
Note: The fields in
tagsandfieldsmay change with subsequent updates.