Skip to content

Huawei Cloud ECS

Collect Huawei Cloud ECS monitoring metrics

Configuration

Install Func

It is recommended to activate the TrueWatch integration - extension - DataFlux Func (Automata): all prerequisites are automatically installed, please proceed with the script installation.

If deploying Func manually, refer to Deploy Func Manually

Install Script

Note: Please prepare the Huawei Cloud AK in advance (for simplicity, you can directly grant global read-only permissions ReadOnlyAccess)

  1. Log in to the Func console, click 【Script Market】, enter the TrueWatch script market, and search for integration_huaweicloud_ecs

  2. Click 【Install】, then enter the corresponding parameters: Huawei Cloud AK, SK, and account name

  3. Click 【Deploy Startup Script】, the system will automatically create the Startup script set and configure the corresponding startup script

  4. After enabling, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click 【Execute】 to execute immediately without waiting for the scheduled time. After a while, you can check the execution task records and corresponding logs

Verification

  1. In 「Manage / Automatic Trigger Configuration」, confirm whether the corresponding task has the corresponding automatic trigger configuration, and check the task records and logs for any exceptions
  2. In TrueWatch, check if there is asset information in 「Infrastructure - Resource Catalog」
  3. In TrueWatch, check if there is corresponding monitoring data in 「Metrics」

Metrics

Configure Huawei Cloud ECS metrics, you can collect more metrics through configuration Huawei Cloud ECS Metrics 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 Disk Free Storage This metric is used to count the remaining storage space of the disk 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"
  }
}

Partial 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 - post-payment method)
1 Annual/Monthly Subscription (i.e., prePaid - pre-payment method)
2 Spot Instance Billing

Note: The fields in tags, fields may change with subsequent updates

Tip 1: tags.instance_id value is the instance ID, used as a unique identifier

Tip 2: status value range and corresponding meanings, please refer to the appendix Cloud Server Status ```