Huawei Cloud APIG
Collect Huawei Cloud APIG monitoring metrics
Configuration¶
Install Func¶
It is recommended to activate 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
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 【Script Market】, enter the official script market, and search for
guance_huaweicloud_apig
-
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 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 task records and logs for any exceptions
- In Guance, check if asset information exists in 「Infrastructure - Resource Catalog」
- In Guance, check if there are corresponding monitoring data in 「Metrics」
Metrics¶
Collect Huawei Cloud APIG metrics, more metrics can be collected through configuration Huawei Cloud APIG Metrics Details
Huawei Cloud APIG metrics are under the huaweicloud_SYS.APIC
measurement, below are the descriptions of APIG related metrics
Metric ID | Metric Name | Metric Meaning | Value Range | Unit | Measurement Object (Dimension) | Monitoring Period (Original Metric) |
---|---|---|---|---|---|---|
throttled_calls |
API Throttled Calls | This metric indicates the cumulative number of calls after the API is throttled | ≥0 | Times/min | Exclusive API Gateway Instance (instance_id) | 1 minute |
requests |
API Calls | This metric indicates the number of API calls | ≥0 | Times/min | Exclusive API Gateway Instance (instance_id) | 1 minute |
req_count_error |
Error Count | This metric indicates the total number of API errors | ≥0 | Times/min | Single API (instance_id, api_id) | 1 minute |
req_count_5xx |
5xx Calls | This metric indicates the number of 5xx calls for the API | ≥0 | Times/min | Single API (instance_id, api_id) | 1 minute |
req_count_4xx |
4xx Calls | This metric indicates the number of 4xx calls for the API | ≥0 | Times/min | Single API (instance_id, api_id) | 1 minute |
req_count_2xx |
2xx Calls | This metric indicates the number of 2xx calls for the API | ≥0 | Times/min | Single API (instance_id, api_id) | 1 minute |
req_count |
API Calls | This metric indicates the number of API calls | ≥0 | Times/min | Single API (instance_id, api_id) | 1 minute |
output_throughput |
Outbound Traffic | This metric indicates the outbound traffic of the API | ≥0 | Byte | Single API (instance_id, api_id) | 1 minute |
max_latency |
Maximum Latency in Milliseconds | This metric indicates the maximum latency in milliseconds for the API | ≥0 | ms | Exclusive API Gateway Instance (instance_id) | 1 minute |
max_latency |
Maximum Latency in Milliseconds | This metric indicates the maximum latency in milliseconds for the API | ≥0 | ms | Single API (instance_id, api_id) | 1 minute |
input_throughput |
Inbound Traffic | This metric indicates the inbound traffic of the API | ≥0 | Byte | Single API (instance_id, api_id) | 1 minute |
error_5xx |
5xx Calls | This metric indicates the number of 5xx calls for the API | ≥0 | Times/min | Exclusive API Gateway Instance (instance_id) | 1 minute |
error_4xx |
4xx Calls | This metric indicates the number of 4xx calls for the API | ≥0 | Times/min | Exclusive API Gateway Instance (instance_id) | 1 minute |
avg_latency |
Average Latency in Milliseconds | This metric indicates the average latency in milliseconds for the API | ≥0 | ms | Exclusive API Gateway Instance (instance_id) | 1 minute |
avg_latency |
Average Latency in Milliseconds | This metric indicates the average latency in milliseconds for the API | ≥0 | ms | Single API (instance_id, api_id) | 1 minute |
node_system_load |
Gateway Node System Load | This metric is used to count the current load details of the data plane gateway node, 1 indicates low water level, 2 indicates medium water level, 3 indicates high water level | 1,2,3 | count | Single API (instance_id, api_id) | 1 minute |
node_cpu_usage |
Gateway Node CPU Usage | This metric is used to count the current CPU usage of the data plane gateway node | ≥0 | % | Single API (instance_id, api_id) | 1 minute |
node_memory_usage |
Gateway Node Memory Usage | This metric is used to count the current memory usage of the data plane gateway node | ≥0 | % | Single API (instance_id, api_id) | 1 minute |
Objects¶
After data is synchronized normally, you can view the data in Guance's 「Infrastructure - Resource Catalog」.
{
"measurement": "huaweicloud_apig",
"tags": {
"RegionId" : "cn-south-4",
"project_id" : "756ada1aa17e4049b2a16ea41912e52d",
"enterprise_project_id" : "0824ss-xxxx-xxxx-xxxx-12334fedffg",
"instance_id" : "xxxxxx",
"instance_name" : "test",
"status" : "AVAILABLE",
"eip_address" : "xxxxxx"
},
"fields": {
"type" : "xxxxxx",
"spec" : "xxxxxx",
"charge_mode" : "1",
"loadbalancer_provider" : "xxxxx",
"create_time" : "2024-11-11T08:15:58Z",
}
}
Note: The fields in
tags
andfields
may change with subsequent updates ```