Huawei Cloud ECS
Collect Huawei Cloud ECS monitoring metrics
Configuration¶
Install Func¶
It is recommended to activate TrueWatch Integration - Extensions - DataFlux Func (Automata): all prerequisites are automatically installed, please proceed with the script installation
If deploying Func manually, refer to Manual Func Deployment
Install Script¶
Note: Please prepare the Huawei Cloud AK that meets the requirements in advance (for simplicity, you can directly grant the global read-only permission
ReadOnlyAccess
)
-
Log in to the Func console, click 【Script Market】, enter the TrueWatch script market, and search for
integration_huaweicloud_ecs
-
Click 【Install】, then enter the corresponding parameters: Huawei Cloud AK, SK, and account name
-
Click 【Deploy Startup Script】, the system will automatically create the
Startup
script set and configure the corresponding startup script -
After enabling, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click 【Execute】 to immediately execute it once without waiting for the scheduled time. Wait a moment, and you can view the execution task records and corresponding logs
Verification¶
- In 「Manage / 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 for any exceptions
- In TrueWatch, 「Infrastructure - Resource Catalog」, check if there is asset information
- In TrueWatch, 「Metrics」, check if there is corresponding monitoring data
Metrics¶
Configure Huawei Cloud ECS metrics, you can collect more metrics through configuration Huawei Cloud ECS Metric Details
Metric ID | Metric Name | Metric Description | Value Range | Measurement Object (Dimension) | Monitoring Period (Original Metric) |
---|---|---|---|---|---|
cpu_usage | CPU Usage | This metric is used to count the current CPU usage of the measurement object. Unit: Percentage. | 0-100% | Cloud Server | 1 minute |
load_average1 | 1 Minute Load Average | This metric is used to count the CPU load average of the measurement object over the past 1 minute. | ≥ 0% | Cloud Server | 1 minute |
load_average5 | 5 Minute Load Average | This metric is used to count the CPU load average of the measurement object over the past 5 minutes. | ≥ 0% | Cloud Server | 1 minute |
load_average15 | 15 Minute Load Average | This metric is used to count the CPU load average of the measurement object over the past 15 minutes. | ≥ 0 Byte/s | Cloud Server | 1 minute |
mem_usedPercent | Memory Usage | This metric is used to count the memory usage of the measurement object. Unit: Percentage | 0-100% | Cloud Server | 1 minute |
net_bitSent | Inbound Bandwidth | This metric is used to count the number of bits received per second by the network card of the measurement object. Unit: bit/s | ≥ 0 bit/s | Cloud Server | 1 minute |
net_bitRecv | Outbound Bandwidth | This metric is used to count the number of bits sent per second by the network card of the measurement object. Unit: bit/s | ≥ 0 bit/s | Cloud Server | 1 minute |
net_packetSent | Network Packet Send Rate | This metric is used to count the number of packets sent per second by the network card of the measurement object. Unit: Counts/s | ≥ 0 Counts/s | Cloud Server | 1 minute |
net_packetRecv | Network Packet Receive Rate | This metric is used to count the number of packets received per second by the network card of the measurement object. Unit: Counts/s | ≥ 0 Counts/s | Cloud Server | 1 minute |
net_tcp_established | TCP ESTABLISHED | This metric is used to count the number of TCP connections in the ESTABLISHED state of the measurement object. Unit: Count | ≥ 0 | Cloud Server | 1 minute |
net_tcp_total | TCP TOTAL | This metric is used to count the total number of TCP connections in all states of the measurement object. Unit: Count | ≥ 0 | Cloud Server | 1 minute |
disk_usedPercent | Disk Usage | This metric is used to count the disk usage of the measurement object, in percentage. Calculation method: Used disk storage / Total disk storage. Unit: Percentage | 0-100% | Cloud Server - Mount Point | 1 minute |
disk_free | Free Disk Space | This metric is used to count the remaining disk space of the measurement object. Unit: GB | ≥0 GB | Cloud Server - Mount Point | 1 minute |
disk_ioUtils | Disk I/O Usage | This metric is used to count the disk I/O usage of the measurement object. Unit: Percentage | 0-100% | Cloud Server - Disk Cloud Server - Mount Point | 1 minute |
disk_inodes_UsedPercent | inode Used Percentage | This metric is used to count the percentage of used inodes on the disk of the measurement object. Unit: Percentage | 0-100% | Cloud Server - Mount Point | 1 minute |
Object¶
The collected Huawei Cloud ECS object data structure can be seen in 「Infrastructure - Resource Catalog」
{
"measurement": "huaweicloud_ecs",
"tags": {
"RegionId" : "cn-north-4",
"project_id" : "xxxxxxx",
"enterprise_project_id" : "0760xxxx-aec0-4838-a91a-28xxxxxxxx",
"instance_id" : "xxxxx",
"instance_name" : "ecs-3384",
"status" : "ACTIVE"
},
"fields": {
"host_status" : "xxxxxxx",
"charging_mode" : "0",
"vpc_id" : "3dda7d4b-aec0-4838-a91a-28xxxxxxxx",
"metadata_os_type" : "Linux",
"os-extended-volumes:volumes_attached": "{JSON Data}",
"OS-EXT-AZ:availability_zone" : "xxxxxxxx",
"created" : "2022-06-16T10:13:24Z",
"description" : "{JSON Data}",
"addresses" : "{IPJSON Data}",
"tags" : "xxxxxxxxx",
"sys_tags" : "xxxxxxxx"
}
}
Some parameter descriptions are as follows:
Parameter Name | Description |
---|---|
resource_spec_code |
Resource Specification |
resource_type |
Resource Type corresponding to the Cloud Server |
charging_mode (Cloud Server Billing Type) value meanings:
Value | Description |
---|---|
0 |
Pay-as-you-go (i.e., postPaid billing method) |
1 |
Annual/Monthly Subscription (i.e., prePaid billing method) |
2 |
Spot Instance Billing |
Note: Fields in
tags
,fields
may change with subsequent updatesTip 1:
tags.instance_id
value is the instance ID, used as a unique identifierTip 2:
status
value range and corresponding meanings, please refer to the appendix Cloud Server Status ```