Huawei Cloud API¶
Use the "TrueWatch Cloud Sync" series of script packages in the Script Market to synchronize cloud monitoring and cloud asset data to TrueWatch
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 Deploy Func Manually
Install Script¶
Note: Please prepare the Huawei Cloud 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】, enter the TrueWatch Script Market, and search for:
integration_huaweicloud_apig
-
After clicking 【Install】, 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 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. After a while, 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, and check the corresponding task records and logs for any exceptions
- In TrueWatch, check if the asset information exists in 「Infrastructure / Custom」
- In TrueWatch, check if there are corresponding monitoring data in 「Metrics」
Metrics¶
After configuring Huawei Cloud Cloud Monitoring, the default Measurement is as follows. More Metrics can be collected through configuration. Huawei Cloud Cloud Monitoring Metrics Details
Metric ID | Metric Name | Metric Description | Value Range | Measurement Object | Monitoring Period (Raw Metric) |
---|---|---|---|---|---|
requests |
API Call Count | Statistics of the number of times the API is called. | ≥0 | Dedicated API Gateway Instance | 1 minute |
error_4xx |
4xx Error Count | Statistics of the number of times the API returns 4xx errors. | ≥0 | Dedicated API Gateway Instance | 1 minute |
error_5xx |
5xx Error Count | Statistics of the number of times the API returns 5xx errors | ≥0 | Dedicated API Gateway Instance | 1 minute |
throttled_calls |
Throttled Call Count | Statistics of the number of times the API is throttled | ≥0 | Dedicated API Gateway Instance | 1 minute |
avg_latency |
Average Latency in Milliseconds | Statistics of the average response latency of the API | ≥0 Unit: Milliseconds | Dedicated API Gateway Instance | 1 minute |
max_latency |
Maximum Latency in Milliseconds | Statistics of the maximum response latency of the API | ≥0 Unit: Milliseconds | Dedicated API Gateway Instance | 1 minute |
req_count |
API Call Count | This metric is used to count the number of API calls | ≥0 | Single API | 1 minute |
req_count_2xx |
2xx Call Count | This metric is used to count the number of 2xx calls for the API | ≥ 0 | Single API | 1 minute |
req_count_4xx |
4xx Error Count | This metric is used to count the number of 4xx errors returned by the API | ≥ 0 | Single API | 1 minute |
req_count_5xx |
5xx Error Count | This metric is used to count the number of 5xx errors returned by the API | ≥ 0 | Single API | 1 minute |
req_count_error |
Error Count | This metric is used to count the total number of errors for the API | ≥ 0 | Single API | 1 minute |
avg_latency |
Average Latency in Milliseconds | This metric is used to count the average response latency of the API | ≥0 Unit: Milliseconds | Single API | 1 minute |
max_latency |
Maximum Latency in Milliseconds | This metric is used to count the maximum response latency of the API | ≥0 Unit: Milliseconds | Single API | 1 minute |
input_throughput |
Inbound Traffic | This metric is used to count the request traffic of the API | ≥0. Unit: Byte/KB/MB/GB | Single API | 1 minute |
output_throughput |
Outbound Traffic | This metric is used to count the response traffic of the API | ≥0. Unit: Byte/KB/MB/GB | Single API | 1 minute |
Objects¶
The collected Huawei Cloud API object data structure can be viewed in 「Infrastructure - Custom」
{
"measurement": "huaweicloud_apig",
"tags": {
"account_name":"Huawei",
"class":"huaweicloud_apig",
"cloud_provider":"huaweicloud",
"instance_name":"apig-d0m1",
"instance_status":"6",
"loadbalancer_provider":"elb",
"RegionId":"cn-north-4",
"spec":"BASIC",
"status":"Running",
"type":"apig"
},
}
Note: The fields in
tags
may change with subsequent updatesNote 1: The value of
instance_name
is the name, used as a unique identifier.