Collector Configuration Manual for «Alibaba Cloud-ECS»
Before reading this article, please read the following first:
Before using this collector, you must install the «Integration Core Package» and its associated third-party dependency packages
1. Configuration Structure
The configuration structure of this collector is as follows:
Field | Type | Required | Description |
---|---|---|---|
regions |
list | Required | List of regions to collect data from |
regions[#] |
str | Required | Region ID. Example: 'cn-hangzhou' See appendix for full list |
2. Configuration Example
Specifying Regions
Collecting data from Hangzhou and Shanghai regions
Python | |
---|---|
1 2 3 |
|
Configuring Filters (Optional)
This collector script supports user-defined filters, allowing users to filter target resources based on object attributes. The filter function returns True or False.
- True: Target resource needs to be collected.
- False: Target resource does not need to be collected.
Supported object attributes for filtering:
Attribute | Description |
---|---|
name | Instance ID |
HostName | Instance ID |
InstanceName | Instance hostname |
InstanceId | Instance ID |
ZoneId | Availability zone ID |
InstanceChargeType | Instance billing method. Possible values: PrePaid: Annual/Monthly. PostPaid: Pay-as-you-go. |
InternetChargeType | Elastic public IP billing method. Possible values: PayByBandwidth: Billing by bandwidth. PayByTraffic: Billing by traffic. |
OSType | Instance operating system |
PublicIpAddress_IpAddress | List of public IPs for the instance |
InstanceType | Instance specification |
InstanceTypeFamily | Instance specification family |
Status | Instance status |
Python | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
3. Data Reporting Format
After data is synchronized successfully, it can be viewed in the «Infrastructure - Resource Catalog» section of Guance and TrueWatch.
Example of reported data:
JSON | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
Fields in tags and fields may change with subsequent updates
tags.name value is the instance ID, used as a unique identifier. fields.message, fields.disks, fields.network_interfaces, fields.instance_renew_attribute, fields.instances_full_status, fields.OperationLocks are all strings serialized in JSON format.
X. Appendix
Refer to the official Alibaba Cloud documentation: